public class TopNQuery extends BaseQuery<Result<TopNResultValue>>
| Modifier and Type | Field and Description |
|---|---|
static String |
TOPN |
QUERY_ID, SQL_QUERY_ID, SUB_QUERY_IDDATASOURCE_METADATA, GROUP_BY, SCAN, SEARCH, SEGMENT_METADATA, SELECT, TIME_BOUNDARY, TIMESERIES| Constructor and Description |
|---|
TopNQuery(DataSource dataSource,
VirtualColumns virtualColumns,
DimensionSpec dimensionSpec,
TopNMetricSpec topNMetricSpec,
int threshold,
QuerySegmentSpec querySegmentSpec,
DimFilter dimFilter,
Granularity granularity,
List<AggregatorFactory> aggregatorSpecs,
List<PostAggregator> postAggregatorSpecs,
Map<String,Object> context) |
checkInterrupted, computeOverriddenContext, computeOverridenContext, getContext, getContextBoolean, getContextValue, getContextValue, getDataSource, getDuration, getGranularity, getId, getIntervals, getQuerySegmentSpec, getQuerySegmentSpecForLookUp, getResultOrdering, getRunner, getSqlQueryId, getSubQueryId, getTimezone, isDescending, withId, withSqlQueryId, withSubQueryIdclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMostSpecificId, withDefaultSubQueryId, withLane, withPrioritypublic static final String TOPN
public TopNQuery(DataSource dataSource, VirtualColumns virtualColumns, DimensionSpec dimensionSpec, TopNMetricSpec topNMetricSpec, int threshold, QuerySegmentSpec querySegmentSpec, DimFilter dimFilter, Granularity granularity, List<AggregatorFactory> aggregatorSpecs, List<PostAggregator> postAggregatorSpecs, Map<String,Object> context)
public boolean hasFilters()
public DimFilter getFilter()
public String getType()
public VirtualColumns getVirtualColumns()
public DimensionSpec getDimensionSpec()
public TopNMetricSpec getTopNMetricSpec()
public int getThreshold()
public DimFilter getDimensionsFilter()
public List<AggregatorFactory> getAggregatorSpecs()
public List<PostAggregator> getPostAggregatorSpecs()
public void initTopNAlgorithmSelector(TopNAlgorithmSelector selector)
public TopNQuery withQuerySegmentSpec(QuerySegmentSpec querySegmentSpec)
QueryQuerySegmentSpec.
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 TopNQuery withDimensionSpec(DimensionSpec spec)
public TopNQuery withAggregatorSpecs(List<AggregatorFactory> aggregatorSpecs)
public Query<Result<TopNResultValue>> withDataSource(DataSource dataSource)
public Query<Result<TopNResultValue>> optimizeForSegment(PerSegmentQueryOptimizationContext optimizationContext)
public TopNQuery withThreshold(int threshold)
public boolean equals(Object o)
equals in class BaseQuery<Result<TopNResultValue>>public int hashCode()
hashCode in class BaseQuery<Result<TopNResultValue>>Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.