Package org.apache.druid.query
package org.apache.druid.query
-
ClassDescriptionA helper class to avoid boilerplate for creating
PrioritizedQueryRunnerCallableobjects.An abstract class for all query exceptions that should return a bad request status code (400).BaseQuery<T>BitmapResultFactory is an abstraction that allows to record something along with preFilter bitmap construction, and emit this information as dimension(s) of query metrics.Query runner that wraps a base single-segment query runner, and wraps its results in aBySegmentResultValueClassobject if the "bySegment" query context parameter is set.CacheStrategy<T,CacheType, QueryType extends Query<T>> Handles caching-related tasks for a particular query type.A QueryRunner that combines a list of other QueryRunners and executes them in parallel on an executor.Enum used in the query context to determine if clone queries should be used by native queries.ColumnSelectorPlus<ColumnSelectorStrategyClass extends ColumnSelectorStrategy>A grouping of various related objects used during query processing for a single dimension, used for convenience.Class that helps non-vectorized query engines handle "granularity" parameters.Represents a source...A user configuration holder for all query types.DefaultQueryMetrics<QueryType extends Query<?>>DefaultQueryMetrics is unsafe for use from multiple threads.Utility class to compare dimensionsCreates a list comparator with custom comparator for the elements.Array comparator that converts the elements to their string representation, before comparing the values using the providedStringComparator.QueryProcessingPoolwrapper overExecs.directExecutor()Contains dimension names used while emitting metrics.A Builder for DataSourceMetadataQuery.A Builder for ScanQuery.A Builder for SearchQuery.A Builder for SegmentMetadataQuery.A Builder for TimeBoundaryQuery.A Builder for TimeseriesQuery.This class models a data source to be unnested which is present along with a filter.Query runner that appliesQueryToolChest.makePostComputeManipulatorFn(Query, MetricManipulationFn)to the result stream.Default implementation ofQueryProcessingPoolthat just forwards operations, including query execution tasks, to an underlyingExecutorServiceExposes a methodForwardingQueryProcessingPool.submitRunnerTask(PrioritizedQueryRunnerCallable, long, TimeUnit)which allows execution tasks to be serviced a custom timeout.Represents an inline datasource where the rows are embedded within the DataSource object itself.SerializesFrameBasedInlineDataSourceto the representation ofInlineDataSourceso that the servers' on wire transfer data doesn't change.Encapsulates aFrameand theRowSignatureof the rows that are encapsulated in itThis factory is used for DI of customQueryMetricsimplementations for all query types, which don't (yet) need to emit custom dimensions and/or metrics, i.TableDataSourcevariant for globally available 'broadcast' segments.Represents an inline datasource, where the rows are embedded within the DataSource object itself.Helper methods to create cursor from iterable of rowsRepresents a join of two datasources.LeafDataSource-s have no inputs.Holder for decomposing a list ofDataSegmentAndDescriptorinto a list of 'active'SegmentReferencefor any segments which are already present in the segments cache, and the remaining list ofDataSegmentAndDescriptorwhich must still be loaded on demand as well as any 'missing'SegmentDescriptorwhich are unavailable to load.Represents a lookup.Implementation ofQueryProcessingPoolthat throws when any query execution task unit is submitted to it.This runner optimizes queries made on a single segment, using per-segment information, before submitting the queries to the base runner.Holds information about a single segment that Query objects can use to optimize themselves when they are run on that single segment.An implementation ofPrioritizedCallablethat also lets caller get access to associatedQueryRunnerIt is used in implementations ofQueryRunnerFactoryQuery<T>This exception is for QueryResource and SqlResource to surface when a query is cast away after it hits a resource limit.Provides the default query config applied to all incoming queries before per-query overrides are merged in.Immutable holder for query context parameters with typed access methods.Base serializable error response.Exception representing a failed query.Provides facilities to executes the given query type by utilizing theQuerySegmentWalkerto run subqueries if necessary.QueryMetrics<QueryType extends Query<?>>Abstraction wrappingServiceMetricEvent.Builderand allowing to control what metrics are actually emitted, what dimensions do they have, etc.QueryPlus<T>An immutable composite object ofQuery+ extra stuff needed inQueryRunners.This class implements the logic of how units of query execution run concurrently.Wrapper class on the queryResourceId string.QueryRunner<T>QueryRunnerFactory<T,QueryType extends Query<T>> An interface that defines the nitty gritty implementation details of a Query on a SegmentAn interface for query-handling entry points.This exception is thrown when a query does not finish before the configured query timeout.QueryToolChest<ResultType,QueryType extends Query<ResultType>> The broker-side (also used by server in some cases) API for a specific Query type.This exception is for the query engine to surface when a query cannot be run.This interface is in a very early stage and should not be considered stable.Exception indicating that an operation failed because it exceeded some configured resource limit.Reperesents a TableDataSource with policy restriction.Result<T>Serialization medium of the query results on the broker.This class is a pointer to a time range of a segment to be queried.If there's a subquery, run it instead of the outer queryTimewarpOperator is an example post-processing operator that maps current time to the latest period ending withing the specified data interval and truncates the query interval to discard data that would be mapped to the future.Implements a QueryRunner that takesResultSerializationModeinto account.This exception is thrown whenResponseContextis truncated after serialization in historicals or realtime tasks.Reperesents a UNION ALL of two or more datasources.The data source for representing an unnest operation.