public class TimeseriesQuery extends BaseQuery<Result<TimeseriesResultValue>>
Modifier and Type | Field and Description |
---|---|
static String |
CTX_GRAND_TOTAL |
static String |
CTX_TIMESTAMP_RESULT_FIELD |
static String |
SKIP_EMPTY_BUCKETS |
QUERY_ID, SQL_QUERY_ID, SUB_QUERY_ID
DATASOURCE_METADATA, GROUP_BY, SCAN, SEARCH, SEGMENT_METADATA, SELECT, TIME_BOUNDARY, TIMESERIES, TOPN, WINDOW_OPERATOR
Constructor and Description |
---|
TimeseriesQuery(DataSource dataSource,
QuerySegmentSpec querySegmentSpec,
boolean descending,
VirtualColumns virtualColumns,
DimFilter dimFilter,
Granularity granularity,
List<AggregatorFactory> aggregatorSpecs,
List<PostAggregator> postAggregatorSpecs,
int limit,
Map<String,Object> context) |
checkInterrupted, computeOverriddenContext, computeOverridenContext, context, getContext, getDataSource, getDuration, getGranularity, getId, getIntervals, getQuerySegmentSpec, getQuerySegmentSpecForLookUp, getResultOrdering, getRunner, getSubQueryId, getTimezone, isDescending, withId, withSqlQueryId, withSubQueryId
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getContextBoolean, getContextHumanReadableBytes, getContextValue, getMostSpecificId, getSqlQueryId, withDefaultSubQueryId, withLane, withPriority
public static final String CTX_GRAND_TOTAL
public static final String SKIP_EMPTY_BUCKETS
public static final String CTX_TIMESTAMP_RESULT_FIELD
public TimeseriesQuery(DataSource dataSource, QuerySegmentSpec querySegmentSpec, boolean descending, VirtualColumns virtualColumns, DimFilter dimFilter, Granularity granularity, List<AggregatorFactory> aggregatorSpecs, List<PostAggregator> postAggregatorSpecs, int limit, Map<String,Object> context)
public boolean hasFilters()
public DimFilter getFilter()
public String getType()
public VirtualColumns getVirtualColumns()
public DimFilter getDimensionsFilter()
public List<AggregatorFactory> getAggregatorSpecs()
public List<PostAggregator> getPostAggregatorSpecs()
public int getLimit()
public boolean isGrandTotal()
public String getTimestampResultField()
public boolean isSkipEmptyBuckets()
@Nullable public Set<String> getRequiredColumns()
Query
QueryDataSource
, this method will not return the columns used by that subquery. As another example, if a
query is built on a JoinDataSource
, this method will not return the columns from the underlying datasources
that are used by the join condition, unless those columns are also used by this query in other ways.
Returns null if the set of required columns cannot be known ahead of time.public TimeseriesQuery withQuerySegmentSpec(QuerySegmentSpec querySegmentSpec)
Query
QuerySegmentSpec
.
This often changes the behavior of Query.getRunner(QuerySegmentWalker)
, since most queries inherit that method
from BaseQuery
, which implements it by calling QuerySegmentSpec.lookup(org.apache.druid.query.Query<T>, org.apache.druid.query.QuerySegmentWalker)
.public Query<Result<TimeseriesResultValue>> withDataSource(DataSource dataSource)
public Query<Result<TimeseriesResultValue>> optimizeForSegment(PerSegmentQueryOptimizationContext optimizationContext)
public TimeseriesQuery withOverriddenContext(Map<String,Object> contextOverrides)
public TimeseriesQuery withDimFilter(DimFilter dimFilter)
public TimeseriesQuery withPostAggregatorSpecs(List<PostAggregator> postAggregatorSpecs)
public boolean equals(Object o)
equals
in class BaseQuery<Result<TimeseriesResultValue>>
public int hashCode()
hashCode
in class BaseQuery<Result<TimeseriesResultValue>>
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.