Uses of Class
org.apache.druid.query.groupby.GroupByQuery
-
-
Uses of GroupByQuery in org.apache.druid.query.groupby
Methods in org.apache.druid.query.groupby that return GroupByQuery Modifier and Type Method Description GroupByQueryGroupByQuery.Builder. build()GroupByQueryGroupingEngine. prepareGroupByQuery(GroupByQuery query)GroupByQueryGroupByQuery. withAggregatorSpecs(List<AggregatorFactory> aggregatorSpecs)GroupByQueryGroupByQuery. withDimensionSpecs(List<DimensionSpec> dimensionSpecs)GroupByQueryGroupByQuery. withDimFilter(DimFilter dimFilter)GroupByQueryGroupByQuery. withLimitSpec(LimitSpec limitSpec)GroupByQueryGroupByQuery. withOverriddenContext(Map<String,Object> contextOverride)GroupByQueryGroupByQuery. withPostAggregatorSpecs(List<PostAggregator> postAggregatorSpecs)GroupByQueryGroupByQuery. withQuerySegmentSpec(QuerySegmentSpec spec)GroupByQueryGroupByQuery. withSubtotalsSpec(List<List<String>> subtotalsSpec)GroupByQueryGroupByQuery. withVirtualColumns(VirtualColumns virtualColumns)Methods in org.apache.druid.query.groupby that return types with arguments of type GroupByQuery Modifier and Type Method Description CacheStrategy<ResultRow,Object,GroupByQuery>GroupByQueryQueryToolChest. getCacheStrategy(GroupByQuery query)QueryToolChest<ResultRow,GroupByQuery>GroupByQueryRunnerFactory. getToolchest()Methods in org.apache.druid.query.groupby with parameters of type GroupByQuery Modifier and Type Method Description Sequence<ResultRow>GroupingEngine. applyPostProcessing(Sequence<ResultRow> results, GroupByQuery query)Apply theGroupByQuery"postProcessingFn", which is responsible for HavingSpec and LimitSpec.static intGroupByQueryResources. countRequiredMergeBufferNumForMergingQueryRunner(GroupByQueryConfig config, GroupByQuery query)Count the number of merge buffers required forGroupByMergingQueryRunnerIt can be either 1 or 2, depending on the query's configstatic intGroupByQueryResources. countRequiredMergeBufferNumForToolchestMerge(GroupByQuery query)Counts the number of merge buffers required forGroupByQueryQueryToolChest.mergeResults(org.apache.druid.query.QueryRunner<org.apache.druid.query.groupby.ResultRow>).com.fasterxml.jackson.databind.ObjectMapperGroupByQueryQueryToolChest. decorateObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper, GroupByQuery query)static ResultRowResultRow. fromLegacyRow(Row row, GroupByQuery query)Create a row based on a legacyRowthat was generated by a givenGroupByQuery.CacheStrategy<ResultRow,Object,GroupByQuery>GroupByQueryQueryToolChest. getCacheStrategy(GroupByQuery query)static intGroupingEngine. getCardinalityForArrayAggregation(GroupByQueryConfig querySpecificConfig, GroupByQuery query, StorageAdapter storageAdapter, ByteBuffer buffer)Returns the cardinality of array needed to do array-based aggregation, or -1 if array-based aggregation is impossible.voidDefaultGroupByQueryMetrics. granularity(GroupByQuery query)voidGroupByQueryMetrics. granularity(GroupByQuery query)Sets the granularity ofBaseQuery.getGranularity()of the given query as dimension.static booleanGroupByQueryQueryToolChest. isNestedQueryPushDown(GroupByQuery q)GroupByQueryMetricsGroupByQueryQueryToolChest. makeMetrics(GroupByQuery query)com.google.common.base.Function<ResultRow,ResultRow>GroupByQueryQueryToolChest. makePostComputeManipulatorFn(GroupByQuery query, MetricManipulationFn fn)com.google.common.base.Function<ResultRow,ResultRow>GroupByQueryQueryToolChest. makePreComputeManipulatorFn(GroupByQuery query, MetricManipulationFn fn)Sequence<ResultRow>GroupingEngine. mergeResults(QueryRunner<ResultRow> baseRunner, GroupByQuery query, ResponseContext responseContext)Runs a providedQueryRunneron a providedGroupByQuery, which is assumed to return rows that are properly sorted (by timestamp and dimensions) but not necessarily fully merged (that is, there may be adjacent rows with the same timestamp and dimensions) and without PostAggregators computed.voidDefaultGroupByQueryMetrics. numComplexMetrics(GroupByQuery query)voidGroupByQueryMetrics. numComplexMetrics(GroupByQuery query)Sets the number of "complex" metrics of the given groupBy query as dimension.voidDefaultGroupByQueryMetrics. numDimensions(GroupByQuery query)voidGroupByQueryMetrics. numDimensions(GroupByQuery query)Sets the size ofgetDimensions()of the given query as dimension.voidDefaultGroupByQueryMetrics. numMetrics(GroupByQuery query)voidGroupByQueryMetrics. numMetrics(GroupByQuery query)Sets the number of metrics of the given groupBy query as dimension.GroupByQueryGroupingEngine. prepareGroupByQuery(GroupByQuery query)static GroupByQueryResourcesGroupingEngine. prepareResource(GroupByQuery query, BlockingPool<ByteBuffer> mergeBufferPool, boolean usesGroupByMergingQueryRunner, GroupByQueryConfig groupByQueryConfig)Initializes resources required to runGroupByQueryQueryToolChest.mergeResults(QueryRunner)andGroupByMergingQueryRunnerfor a particular query.Sequence<ResultRow>GroupingEngine. process(GroupByQuery query, StorageAdapter storageAdapter, GroupByQueryMetrics groupByQueryMetrics)Process a groupBy query on a singleStorageAdapter.Sequence<ResultRow>GroupingEngine. processSubqueryResult(GroupByQuery subquery, GroupByQuery query, GroupByQueryResources resource, Sequence<ResultRow> subqueryResult, boolean wasQueryPushedDown)Called byGroupByQueryQueryToolChest.mergeResults(QueryRunner)when it needs to process a subquery.Sequence<ResultRow>GroupingEngine. processSubtotalsSpec(GroupByQuery query, GroupByQueryResources resource, Sequence<ResultRow> queryResult)Called byGroupByQueryQueryToolChest.mergeResults(QueryRunner)when it needs to generate subtotals.voidDefaultGroupByQueryMetrics. query(GroupByQuery query)voidGroupByResourcesReservationPool. reserve(QueryResourceId queryResourceId, GroupByQuery groupByQuery, boolean willMergeRunner)Reserves appropriate resources, and maps it to the queryResourceId (usually the query's resource id) in the internal map.RowSignatureGroupByQueryQueryToolChest. resultArraySignature(GroupByQuery query)Sequence<Object[]>GroupByQueryQueryToolChest. resultsAsArrays(GroupByQuery query, Sequence<ResultRow> resultSequence)Optional<Sequence<FrameSignaturePair>>GroupByQueryQueryToolChest. resultsAsFrames(GroupByQuery query, Sequence<ResultRow> resultSequence, MemoryAllocatorFactory memoryAllocatorFactory, boolean useNestedForUnknownTypes)This returns a single frame containing the results of the group by query.Map<String,Object>ResultRow. toMap(GroupByQuery query)Returns a Map representation of the data in this row.MapBasedRowResultRow. toMapBasedRow(GroupByQuery query)Returns aRowrepresentation of the data in this row.GroupByQueryConfigGroupByQueryConfig. withOverrides(GroupByQuery query)static Sequence<ResultRow>GroupingEngine. wrapSummaryRowIfNeeded(GroupByQuery query, Sequence<ResultRow> process)Wraps the sequence around if for this query a summary row might be needed in case the input becomes empty.Constructors in org.apache.druid.query.groupby with parameters of type GroupByQuery Constructor Description Builder(GroupByQuery query) -
Uses of GroupByQuery in org.apache.druid.query.groupby.epinephelinae
Methods in org.apache.druid.query.groupby.epinephelinae with parameters of type GroupByQuery Modifier and Type Method Description static Pair<Grouper<RowBasedGrouperHelper.RowBasedKey>,Accumulator<AggregateResult,ResultRow>>RowBasedGrouperHelper. createGrouperAccumulatorPair(GroupByQuery query, GroupByQuery subquery, GroupByQueryConfig config, DruidProcessingConfig processingConfig, com.google.common.base.Supplier<ByteBuffer> bufferSupplier, ReferenceCountingResourceHolder<ByteBuffer> combineBufferHolder, int concurrencyHint, LimitedTemporaryStorage temporaryStorage, com.fasterxml.jackson.databind.ObjectMapper spillMapper, com.google.common.util.concurrent.ListeningExecutorService grouperSorter, int priority, boolean hasQueryTimeout, long queryTimeoutAt, int mergeBufferSize)Create aGrouperthat groups according to the dimensions and aggregators in "query", along with anAccumulatorthat accepts ResultRows and forwards them to the grouper.static Pair<Grouper<RowBasedGrouperHelper.RowBasedKey>,Accumulator<AggregateResult,ResultRow>>RowBasedGrouperHelper. createGrouperAccumulatorPair(GroupByQuery query, GroupByQuery subquery, GroupByQueryConfig config, DruidProcessingConfig processingConfig, com.google.common.base.Supplier<ByteBuffer> bufferSupplier, LimitedTemporaryStorage temporaryStorage, com.fasterxml.jackson.databind.ObjectMapper spillMapper, int mergeBufferSize)Create a single-threaded grouper and accumulator.static ColumnSelectorFactoryRowBasedGrouperHelper. createResultRowBasedColumnSelectorFactory(GroupByQuery query, com.google.common.base.Supplier<ResultRow> supplier, RowSignature.Finalization finalization)Creates aColumnSelectorFactorythat can read rows which originate as results of the provided "query".static CloseableGrouperIterator<RowBasedGrouperHelper.RowBasedKey,ResultRow>RowBasedGrouperHelper. makeGrouperIterator(Grouper<RowBasedGrouperHelper.RowBasedKey> grouper, GroupByQuery query, Closeable closeable)static CloseableGrouperIterator<RowBasedGrouperHelper.RowBasedKey,ResultRow>RowBasedGrouperHelper. makeGrouperIterator(Grouper<RowBasedGrouperHelper.RowBasedKey> grouper, GroupByQuery query, List<DimensionSpec> dimsToInclude, Closeable closeable)static Sequence<ResultRow>GroupByQueryEngine. process(GroupByQuery query, StorageAdapter storageAdapter, ByteBuffer processingBuffer, org.joda.time.DateTime fudgeTimestamp, GroupByQueryConfig querySpecificConfig, DruidProcessingConfig processingConfig, Filter filter, org.joda.time.Interval interval, GroupByQueryMetrics groupByQueryMetrics)static GroupByRowProcessor.ResultSupplierGroupByRowProcessor. process(GroupByQuery query, GroupByQuery subquery, Sequence<ResultRow> rows, GroupByQueryConfig config, DruidProcessingConfig processingConfig, GroupByQueryResources resource, com.fasterxml.jackson.databind.ObjectMapper spillMapper, String processingTmpDir, int mergeBufferSize)Process the input of sequence "rows" (output by "subquery") based on "query" and returns aGroupByRowProcessor.ResultSupplier.Constructors in org.apache.druid.query.groupby.epinephelinae with parameters of type GroupByQuery Constructor Description GroupByResultMergeFn(GroupByQuery query) -
Uses of GroupByQuery in org.apache.druid.query.groupby.epinephelinae.vector
Methods in org.apache.druid.query.groupby.epinephelinae.vector with parameters of type GroupByQuery Modifier and Type Method Description static booleanVectorGroupByEngine. canVectorize(GroupByQuery query, StorageAdapter adapter, Filter filter)static Sequence<ResultRow>VectorGroupByEngine. process(GroupByQuery query, StorageAdapter storageAdapter, ByteBuffer processingBuffer, org.joda.time.DateTime fudgeTimestamp, Filter filter, org.joda.time.Interval interval, GroupByQueryConfig config, DruidProcessingConfig processingConfig, GroupByQueryMetrics groupByQueryMetrics) -
Uses of GroupByQuery in org.apache.druid.query.groupby.having
Methods in org.apache.druid.query.groupby.having with parameters of type GroupByQuery Modifier and Type Method Description voidAlwaysHavingSpec. setQuery(GroupByQuery query)voidAndHavingSpec. setQuery(GroupByQuery query)voidDimensionSelectorHavingSpec. setQuery(GroupByQuery query)voidDimFilterHavingSpec. setQuery(GroupByQuery query)voidEqualToHavingSpec. setQuery(GroupByQuery query)voidGreaterThanHavingSpec. setQuery(GroupByQuery query)voidHavingSpec. setQuery(GroupByQuery query)Informs this HavingSpec that rows passed to "eval" will originate from a particular groupBy query.voidLessThanHavingSpec. setQuery(GroupByQuery query)voidNeverHavingSpec. setQuery(GroupByQuery query)voidNotHavingSpec. setQuery(GroupByQuery query)voidOrHavingSpec. setQuery(GroupByQuery query) -
Uses of GroupByQuery in org.apache.druid.query.groupby.orderby
Methods in org.apache.druid.query.groupby.orderby with parameters of type GroupByQuery Modifier and Type Method Description com.google.common.base.Function<Sequence<ResultRow>,Sequence<ResultRow>>DefaultLimitSpec. build(GroupByQuery query)com.google.common.base.Function<Sequence<ResultRow>,Sequence<ResultRow>>LimitSpec. build(GroupByQuery query)Returns a function that applies a limit to an input sequence that is assumed to be sorted on dimensions.com.google.common.base.Function<Sequence<ResultRow>,Sequence<ResultRow>>NoopLimitSpec. build(GroupByQuery query)
-