Uses of Class
org.apache.druid.query.groupby.GroupByQuery
Packages that use GroupByQuery
Package
Description
-
Uses of GroupByQuery in org.apache.druid.query.groupby
Methods in org.apache.druid.query.groupby that return GroupByQueryModifier and TypeMethodDescriptionGroupByQuery.Builder.build()GroupingEngine.prepareGroupByQuery(GroupByQuery query) GroupByQuery.withAggregatorSpecs(List<AggregatorFactory> aggregatorSpecs) GroupByQuery.withDimensionSpecs(List<DimensionSpec> dimensionSpecs) GroupByQuery.withDimFilter(DimFilter dimFilter) GroupByQuery.withLimitSpec(LimitSpec limitSpec) GroupByQuery.withOverriddenContext(Map<String, Object> contextOverride) GroupByQuery.withPostAggregatorSpecs(List<PostAggregator> postAggregatorSpecs) GroupByQuery.withQuerySegmentSpec(QuerySegmentSpec spec) GroupByQuery.withSubtotalsSpec(List<List<String>> subtotalsSpec) GroupByQuery.withVirtualColumns(VirtualColumns virtualColumns) Methods in org.apache.druid.query.groupby that return types with arguments of type GroupByQueryModifier and TypeMethodDescriptionGroupByQueryQueryToolChest.getCacheStrategy(GroupByQuery query) GroupByQueryQueryToolChest.getCacheStrategy(GroupByQuery query, com.fasterxml.jackson.databind.ObjectMapper mapper) GroupByQueryRunnerFactory.getToolchest()Methods in org.apache.druid.query.groupby with parameters of type GroupByQueryModifier and TypeMethodDescriptionGroupingEngine.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 com.fasterxml.jackson.databind.ObjectMapperResultRowObjectMapperDecoratorUtil.decorateObjectMapper(com.fasterxml.jackson.databind.ObjectMapper baseObjectMapper, GroupByQuery query, GroupByQueryConfig groupByQueryConfig) Decorates the provided object mapper so that it can read the result rows generated by the given query and the groupByQueryConfig.static ResultRowResultRow.fromLegacyRow(Row row, GroupByQuery query) Create a row based on a legacyRowthat was generated by a givenGroupByQuery.GroupByQueryQueryToolChest.getCacheStrategy(GroupByQuery query) GroupByQueryQueryToolChest.getCacheStrategy(GroupByQuery query, com.fasterxml.jackson.databind.ObjectMapper mapper) static intGroupingEngine.getCardinalityForArrayAggregation(GroupByQueryConfig querySpecificConfig, GroupByQuery query, ColumnInspector columnInspector, List<? extends GroupingSelector> groupingSelectors, 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) static CursorBuildSpecGroupingEngine.makeCursorBuildSpec(GroupByQuery query, QueryMetrics<?> queryMetrics) GroupByQueryQueryToolChest.makeMetrics(GroupByQuery query) GroupByQueryQueryToolChest.makePostComputeManipulatorFn(GroupByQuery query, MetricManipulationFn fn) GroupByQueryQueryToolChest.makePreComputeManipulatorFn(GroupByQuery query, MetricManipulationFn fn) 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.GroupingEngine.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.GroupingEngine.process(GroupByQuery query, CursorFactory cursorFactory, TimeBoundaryInspector timeBoundaryInspector, NonBlockingPool<ByteBuffer> bufferPool, GroupByQueryMetrics groupByQueryMetrics) Process a groupBy query on a singleCursorFactory.GroupingEngine.processSubqueryResult(GroupByQuery subquery, GroupByQuery query, GroupByQueryResources resource, Sequence<ResultRow> subqueryResult, boolean wasQueryPushedDown, GroupByStatsProvider.PerQueryStats perQueryStats) Called byGroupByQueryQueryToolChest.mergeResults(QueryRunner)when it needs to process a subquery.GroupingEngine.processSubtotalsSpec(GroupByQuery query, GroupByQueryResources resource, Sequence<ResultRow> queryResult, GroupByStatsProvider.PerQueryStats perQueryStats) Called byGroupByQueryQueryToolChest.mergeResults(QueryRunner)when it needs to generate subtotals.voidDefaultGroupByQueryMetrics.query(GroupByQuery query) voidGroupByResourcesReservationPool.reserve(QueryResourceId queryResourceId, GroupByQuery groupByQuery, boolean willMergeRunner, GroupByStatsProvider.PerQueryStats perQueryStats) Reserves appropriate resources, and maps it to the queryResourceId (usually the query's resource id) in the internal map.GroupByQueryQueryToolChest.resultArraySignature(GroupByQuery query) GroupByQueryQueryToolChest.resultsAsArrays(GroupByQuery query, Sequence<ResultRow> resultSequence) GroupByQueryQueryToolChest.resultsAsFrames(GroupByQuery query, Sequence<ResultRow> resultSequence, MemoryAllocatorFactory memoryAllocatorFactory, boolean useNestedForUnknownTypes) This returns a single frame containing the results of the group by query.static booleanGroupingEngine.summaryRowPreconditions(GroupByQuery query) Whether a query should include a summary row.ResultRow.toMap(GroupByQuery query) Returns a Map representation of the data in this row.ResultRow.toMapBasedRow(GroupByQuery query) Returns aRowrepresentation of the data in this row.GroupByQueryConfig.withOverrides(GroupByQuery query) 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 -
Uses of GroupByQuery in org.apache.druid.query.groupby.epinephelinae
Methods in org.apache.druid.query.groupby.epinephelinae with parameters of type GroupByQueryModifier and TypeMethodDescriptionRowBasedGrouperHelper.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, GroupByStatsProvider.PerQueryStats perQueryStats) Create aGrouperthat groups according to the dimensions and aggregators in "query", along with anAccumulatorthat accepts ResultRows and forwards them to the grouper.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, GroupByStatsProvider.PerQueryStats perQueryStats) 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".RowBasedGrouperHelper.makeGrouperIterator(Grouper<RowBasedGrouperHelper.RowBasedKey> grouper, GroupByQuery query, Closeable closeable) RowBasedGrouperHelper.makeGrouperIterator(Grouper<RowBasedGrouperHelper.RowBasedKey> grouper, GroupByQuery query, List<DimensionSpec> dimsToInclude, Closeable closeable) GroupByQueryEngine.process(GroupByQuery query, TimeBoundaryInspector timeBoundaryInspector, CursorHolder cursorHolder, CursorBuildSpec buildSpec, ByteBuffer processingBuffer, org.joda.time.DateTime fudgeTimestamp, GroupByQueryConfig querySpecificConfig, DruidProcessingConfig processingConfig) GroupByRowProcessor.process(GroupByQuery query, GroupByQuery subquery, Sequence<ResultRow> rows, GroupByQueryConfig config, DruidProcessingConfig processingConfig, GroupByQueryResources resource, com.fasterxml.jackson.databind.ObjectMapper spillMapper, String processingTmpDir, int mergeBufferSize, GroupByStatsProvider.PerQueryStats perQueryStats) 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 -
Uses of GroupByQuery in org.apache.druid.query.groupby.epinephelinae.vector
Methods in org.apache.druid.query.groupby.epinephelinae.vector with parameters of type GroupByQueryModifier and TypeMethodDescriptionVectorGroupByEngine.process(GroupByQuery query, TimeBoundaryInspector timeBoundaryInspector, CursorHolder cursorHolder, ByteBuffer processingBuffer, org.joda.time.DateTime fudgeTimestamp, org.joda.time.Interval interval, GroupByQueryConfig config, DruidProcessingConfig processingConfig) -
Uses of GroupByQuery in org.apache.druid.query.groupby.having
Methods in org.apache.druid.query.groupby.having with parameters of type GroupByQueryModifier and TypeMethodDescriptionvoidAlwaysHavingSpec.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 GroupByQueryModifier and TypeMethodDescriptionDefaultLimitSpec.build(GroupByQuery query) LimitSpec.build(GroupByQuery query) Returns a function that applies a limit to an input sequence that is assumed to be sorted on dimensions.NoopLimitSpec.build(GroupByQuery query)