Tabnine Logo
CardinalityAggregatorFactory.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.druid.query.aggregation.cardinality.CardinalityAggregatorFactory
constructor

Best Java code snippets using org.apache.druid.query.aggregation.cardinality.CardinalityAggregatorFactory.<init> (Showing top 20 results out of 315)

origin: apache/incubator-druid

@Override
public List<AggregatorFactory> getRequiredColumns()
{
 return fields.stream()
        .map(
          field ->
            new CardinalityAggregatorFactory(
              field.getOutputName(),
              null,
              Collections.singletonList(field),
              byRow,
              round
            )
        )
        .collect(Collectors.toList());
}
origin: apache/incubator-druid

ImmutableMap.of(
  "uniques",
  new CardinalityAggregatorFactory(
    "uniques",
    null,
origin: apache/incubator-druid

aggregatorFactory = new CardinalityAggregatorFactory(
  aggregatorName,
  null,
origin: apache/incubator-druid

.intervals(QueryRunnerTestHelper.firstToThird)
.aggregators(duplicateAggregators(
  new CardinalityAggregatorFactory("numVals", aggregatorDimensionSpecs, false),
  new CardinalityAggregatorFactory("numVals1", aggregatorDimensionSpecs, false)
))
.build();
origin: apache/incubator-druid

@Test
public void testSerde() throws Exception
 CardinalityAggregatorFactory factory = new CardinalityAggregatorFactory(
   "billy",
   null,
 );
 CardinalityAggregatorFactory factory2 = new CardinalityAggregatorFactory(
   "billy",
   ImmutableList.of(
origin: apache/incubator-druid

AGGS(
  new FilteredAggregatorFactory(
    new CardinalityAggregatorFactory(
      "a0",
      null,
  ),
  new FilteredAggregatorFactory(
    new CardinalityAggregatorFactory(
      "a1",
      null,
origin: apache/incubator-druid

CardinalityAggregatorFactory factory = new CardinalityAggregatorFactory(
  "billy",
  Collections.singletonList(new DefaultDimensionSpec("dim1", "dim1")),
origin: apache/incubator-druid

AGGS(
  new LongSumAggregatorFactory("a0", "cnt"),
  new CardinalityAggregatorFactory(
    "a1",
    null,
  ),
  new FilteredAggregatorFactory(
    new CardinalityAggregatorFactory(
      "a2",
      null,
    NOT(SELECTOR("dim2", "", null))
  ),
  new CardinalityAggregatorFactory(
    "a3",
    null,
    true
  ),
  new CardinalityAggregatorFactory(
    "a4",
    null,
origin: apache/incubator-druid

.intervals(QueryRunnerTestHelper.firstToThird)
.aggregators(duplicateAggregators(
  new CardinalityAggregatorFactory("numVals", aggregatorDimensionSpecs, false),
  new CardinalityAggregatorFactory("numVals1", aggregatorDimensionSpecs, false)
))
.build();
origin: apache/incubator-druid

.granularity(Granularities.ALL)
.aggregators(AGGS(
  new CardinalityAggregatorFactory(
    "a0",
    null,
origin: apache/incubator-druid

.aggregators(
  AGGS(
    new CardinalityAggregatorFactory(
      "a0",
      null,
origin: apache/incubator-druid

AGGS(
  new LongSumAggregatorFactory("a0", "cnt"),
  new CardinalityAggregatorFactory(
    "a1",
    null,
origin: apache/incubator-druid

.setAggregatorSpecs(
  AGGS(
    new CardinalityAggregatorFactory(
      "a0",
      null,
origin: apache/incubator-druid

@Test
public void testSubqueryWithOuterCardinalityAggregator()
{
 final GroupByQuery subquery = GroupByQuery
   .builder()
   .setDataSource(QueryRunnerTestHelper.dataSource)
   .setQuerySegmentSpec(QueryRunnerTestHelper.fullOnIntervalSpec)
   .setDimensions(new DefaultDimensionSpec("market", "market"), new DefaultDimensionSpec("quality", "quality"))
   .setAggregatorSpecs(QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory("index", "index"))
   .setGranularity(QueryRunnerTestHelper.dayGran)
   .build();
 final GroupByQuery query = GroupByQuery
   .builder()
   .setDataSource(subquery)
   .setQuerySegmentSpec(QueryRunnerTestHelper.fullOnIntervalSpec)
   .setDimensions(Collections.emptyList())
   .setAggregatorSpecs(new CardinalityAggregatorFactory(
     "car",
     ImmutableList.of(new DefaultDimensionSpec("quality", "quality")),
     false
   ))
   .setGranularity(QueryRunnerTestHelper.allGran)
   .build();
 List<Row> expectedResults = Collections.singletonList(
   GroupByQueryRunnerTestHelper.createExpectedRow("1970-01-01", "car", QueryRunnerTestHelper.UNIQUES_9)
 );
 Iterable<Row> results = GroupByQueryRunnerTestHelper.runQuery(factory, runner, query);
 TestHelper.assertExpectedObjects(expectedResults, results, "subquery-cardinality");
}
origin: apache/incubator-druid

.setAggregatorSpecs(
  AGGS(
    new CardinalityAggregatorFactory(
      "a0:a",
      null,
origin: apache/incubator-druid

.aggregators(
  AGGS(
    new CardinalityAggregatorFactory(
      "a0",
      null,
origin: apache/incubator-druid

.aggregators(
  AGGS(
    new CardinalityAggregatorFactory(
      "a0",
      null,
origin: apache/incubator-druid

AGGS(
  new LongSumAggregatorFactory("a0", "cnt"),
  new CardinalityAggregatorFactory(
    "a1",
    null,
origin: apache/incubator-druid

.setQuerySegmentSpec(QueryRunnerTestHelper.firstToThird)
.setDimensions(new DefaultDimensionSpec("market", "alias"))
.setAggregatorSpecs(QueryRunnerTestHelper.rowsCount, new CardinalityAggregatorFactory(
  "numVals",
  ImmutableList.of(new ExtractionDimensionSpec(
origin: apache/incubator-druid

.setAggregatorSpecs(AGGS(
  new CountAggregatorFactory("a0"),
  new CardinalityAggregatorFactory(
    "a1",
    null,
org.apache.druid.query.aggregation.cardinalityCardinalityAggregatorFactory<init>

Popular methods of CardinalityAggregatorFactory

  • combine
  • finalizeComputation
  • getMaxIntermediateSizeWithNulls
  • makeFieldsFromFieldNames
  • makeRequiredFieldNamesFromFields

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Notification (javax.management)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now