Package io.druid.query.aggregation

Examples of io.druid.query.aggregation.DoubleSumAggregatorFactory


                new DimensionsSpec(ImmutableList.of("dimB", "dimA"), null, null)
            ),
            null, null, null, null
        ),
        new AggregatorFactory[]{
            new DoubleSumAggregatorFactory("metric1", "col1"),
            new DoubleSumAggregatorFactory("metric2", "col2"),
        },
        new ArbitraryGranularitySpec(QueryGranularity.DAY, ImmutableList.of(Interval.parse("2014/2015")))
    );

    Assert.assertEquals(
View Full Code Here


                new DimensionsSpec(ImmutableList.of("time", "dimA", "dimB", "col2"), ImmutableList.of("dimC"), null)
            ),
            null, null, null, null
        ),
        new AggregatorFactory[]{
            new DoubleSumAggregatorFactory("metric1", "col1"),
            new DoubleSumAggregatorFactory("metric2", "col2"),
        },
        new ArbitraryGranularitySpec(QueryGranularity.DAY, ImmutableList.of(Interval.parse("2014/2015")))
    );

    Assert.assertEquals(
View Full Code Here

            tieredBrokerConfig,
            queryBuilder.aggregators(
                ImmutableList.of(
                    new CountAggregatorFactory("count"),
                    new LongSumAggregatorFactory("longSum", "a"),
                    new DoubleSumAggregatorFactory("doubleSum", "b")
                )
            ).build()
        )
    );

    // in absence of tiers, expect the default
    tierBrokerMap.clear();
    Assert.assertEquals(
        Optional.of("druid/broker"),
        jsStrategy.getBrokerServiceName(
            tieredBrokerConfig,
            queryBuilder.aggregators(
                ImmutableList.of(
                    new CountAggregatorFactory("count"),
                    new LongSumAggregatorFactory("longSum", "a"),
                    new DoubleSumAggregatorFactory("doubleSum", "b")
                )
            ).build()
        )
    );
View Full Code Here

  @Test
  public void testVerifyAggregations() throws Exception
  {
    List<AggregatorFactory> aggFactories = Arrays.<AggregatorFactory>asList(
        new CountAggregatorFactory("count"),
        new DoubleSumAggregatorFactory("idx", "index"),
        new DoubleSumAggregatorFactory("rev", "revenue")
    );

    List<PostAggregator> postAggs = Arrays.<PostAggregator>asList(
        new ArithmeticPostAggregator(
            "addStuff",
View Full Code Here

  @Test
  public void testVerifyAggregationsMissingVal() throws Exception
  {
    List<AggregatorFactory> aggFactories = Arrays.<AggregatorFactory>asList(
        new CountAggregatorFactory("count"),
        new DoubleSumAggregatorFactory("idx", "index"),
        new DoubleSumAggregatorFactory("rev", "revenue")
    );

    List<PostAggregator> postAggs = Arrays.<PostAggregator>asList(
        new ArithmeticPostAggregator(
            "addStuff",
View Full Code Here

  @Test
  public void testVerifyAggregationsMultiLevel() throws Exception
  {
    List<AggregatorFactory> aggFactories = Arrays.<AggregatorFactory>asList(
        new CountAggregatorFactory("count"),
        new DoubleSumAggregatorFactory("idx", "index"),
        new DoubleSumAggregatorFactory("rev", "revenue")
    );

    List<PostAggregator> postAggs = Arrays.<PostAggregator>asList(
        new ArithmeticPostAggregator(
            "divideStuff",
View Full Code Here

  @Test
  public void testVerifyAggregationsMultiLevelMissingVal() throws Exception
  {
    List<AggregatorFactory> aggFactories = Arrays.<AggregatorFactory>asList(
        new CountAggregatorFactory("count"),
        new DoubleSumAggregatorFactory("idx", "index"),
        new DoubleSumAggregatorFactory("rev", "revenue")
    );

    List<PostAggregator> postAggs = Arrays.<PostAggregator>asList(
        new ArithmeticPostAggregator(
            "divideStuff",
View Full Code Here

            Granularity.DAY,
            null,
            ImmutableList.of(new Interval("2010-01-01/P2D")),
            Granularity.DAY
        ),
        new AggregatorFactory[]{new DoubleSumAggregatorFactory("met", "met")},
        QueryGranularity.NONE,
        10000,
        newMockFirehoseFactory(
            ImmutableList.of(
                IR("2010-01-01T01", "x", "y", 1),
View Full Code Here

    final Task indexTask = new IndexTask(
        null,
        null,
        "foo",
        new UniformGranularitySpec(Granularity.DAY, null, ImmutableList.of(new Interval("2010-01-01/P1D")), Granularity.DAY),
        new AggregatorFactory[]{new DoubleSumAggregatorFactory("met", "met")},
        QueryGranularity.NONE,
        10000,
        newMockExceptionalFirehoseFactory(),
        -1,
        TestUtils.MAPPER
View Full Code Here

        .setInterval("2011-04-02/2011-04-04")
        .setDimensions(Lists.<DimensionSpec>newArrayList(new DefaultDimensionSpec("quality", "alias")))
        .setAggregatorSpecs(
            Arrays.<AggregatorFactory>asList(
                QueryRunnerTestHelper.rowsCount,
                new DoubleSumAggregatorFactory("idx", "index")
            )
        )
        .addOrderByColumn("idx", "desc")
        .addOrderByColumn("alias", "d")
        .setGranularity(new PeriodGranularity(new Period("P1M"), null, null));
View Full Code Here

TOP

Related Classes of io.druid.query.aggregation.DoubleSumAggregatorFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.