Package org.apache.druid.query.union
Class UnionQuery
java.lang.Object
org.apache.druid.query.union.UnionQuery
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface org.apache.druid.query.Query
DATASOURCE_METADATA, GROUP_BY, SCAN, SEARCH, SEGMENT_METADATA, SELECT, TIME_BOUNDARY, TIMESERIES, TOPN, UNION_QUERY, WINDOW_OPERATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the context as an (immutable) map.org.joda.time.DurationgetId()List<org.joda.time.Interval>com.google.common.collect.Ordering<Object>Comparator that represents the order in which results are generated from theQueryRunnerFactory.createRunner(Segment)andQueryRunnerFactory.mergeRunners(QueryProcessingPool, Iterable)calls.getResultRowSignature(RowSignature.Finalization finalization) getRunner(QuerySegmentWalker walker) Returns the subQueryId of this query.org.joda.time.DateTimeZonegetType()booleanstatic DruidExceptiontoString()withDataSource(DataSource dataSource) withDataSources(List<DataSource> children) withOverriddenContext(Map<String, Object> contextOverrides) Returns a new query, identical to this one, but with a different associatedQuerySegmentSpec.withSubQueryId(String subQueryId) Returns a copy of this query with a new subQueryId (seeQuery.getSubQueryId().Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.druid.query.Query
context, getContextBoolean, getContextHumanReadableBytes, getContextValue, getMostSpecificId, getRequiredColumns, getResultRowSignature, getSingleInterval, getSqlQueryId, getVirtualColumns, mayCollapseQueryDataSource, optimizeForSegment, withDefaultSubQueryId, withLane, withPriority, withSqlQueryId
-
Field Details
-
context
-
queries
-
-
Constructor Details
-
UnionQuery
-
UnionQuery
-
-
Method Details
-
getDataSource
- Specified by:
getDataSourcein interfaceQuery<Object>
-
getDataSources
-
hasFilters
public boolean hasFilters()- Specified by:
hasFiltersin interfaceQuery<Object>
-
getFilter
-
getType
-
getRunner
-
getIntervals
- Specified by:
getIntervalsin interfaceQuery<Object>
-
getDuration
public org.joda.time.Duration getDuration()- Specified by:
getDurationin interfaceQuery<Object>
-
getGranularity
- Specified by:
getGranularityin interfaceQuery<Object>
-
getTimezone
public org.joda.time.DateTimeZone getTimezone()- Specified by:
getTimezonein interfaceQuery<Object>
-
getContext
Description copied from interface:QueryReturns the context as an (immutable) map.- Specified by:
getContextin interfaceQuery<Object>
-
getResultOrdering
Description copied from interface:QueryComparator that represents the order in which results are generated from theQueryRunnerFactory.createRunner(Segment)andQueryRunnerFactory.mergeRunners(QueryProcessingPool, Iterable)calls. This is used to combine streams of results from different sources; for example, it's used by historicals to combine streams from different segments, and it's used by the broker to combine streams from different historicals.Important note: sometimes, this ordering is used in a type-unsafe way to order @{code Result
} objects. Because of this, implementations should fall back to Ordering.natural()when they are given an object that is not of type T.- Specified by:
getResultOrderingin interfaceQuery<Object>
-
withOverriddenContext
- Specified by:
withOverriddenContextin interfaceQuery<Object>
-
withQuerySegmentSpec
Description copied from interface:QueryReturns a new query, identical to this one, but with a different associatedQuerySegmentSpec.This often changes the behavior of
Query.getRunner(QuerySegmentWalker), since most queries inherit that method fromBaseQuery, which implements it by callingQuerySegmentSpec.lookup(org.apache.druid.query.Query<T>, org.apache.druid.query.QuerySegmentWalker).- Specified by:
withQuerySegmentSpecin interfaceQuery<Object>
-
withId
-
getId
-
withSubQueryId
Description copied from interface:QueryReturns a copy of this query with a new subQueryId (seeQuery.getSubQueryId().- Specified by:
withSubQueryIdin interfaceQuery<Object>
-
getSubQueryId
Description copied from interface:QueryReturns the subQueryId of this query. This is set by ClientQuerySegmentWalker (the entry point for the Broker's query stack) on any subqueries that it issues. It is null for the main query.- Specified by:
getSubQueryIdin interfaceQuery<Object>
-
withDataSource
- Specified by:
withDataSourcein interfaceQuery<Object>
-
withDataSources
-
toString
-
methodNotSupported
-
getResultRowSignature
- Specified by:
getResultRowSignaturein interfaceQuery<Object>
-