public class TopNQuery extends AbstractDruidAggregationQuery<TopNQuery>
aggregations, dimensions, postAggregationsfilter, granularity, intervalscontext, dataSource, queryType| Modifier | Constructor and Description |
|---|---|
|
TopNQuery(DataSource dataSource,
Granularity granularity,
Dimension dimension,
Filter filter,
Collection<Aggregation> aggregations,
Collection<PostAggregation> postAggregations,
Collection<org.joda.time.Interval> intervals,
long threshold,
TopNMetric metric)
Constructor.
|
protected |
TopNQuery(DataSource dataSource,
Granularity granularity,
Dimension dimension,
Filter filter,
Collection<Aggregation> aggregations,
Collection<PostAggregation> postAggregations,
Collection<org.joda.time.Interval> intervals,
long threshold,
TopNMetric metric,
QueryContext context,
boolean doFork)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Dimension |
getDimension() |
Collection<Dimension> |
getDimensions()
Returns the dimensions of the query if any.
|
TopNMetric |
getMetric() |
long |
getThreshold() |
TopNQuery |
withAggregations(Collection<Aggregation> aggregations)
Returns a copy of this query with the specified aggregations.
|
TopNQuery |
withAllIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals set in this and all inner queries.
|
TopNQuery |
withContext(QueryContext context)
Returns a copy of this query with the specified context.
|
TopNQuery |
withDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source.
|
TopNQuery |
withDimension(Dimension dimension) |
TopNQuery |
withFilter(Filter filter)
Returns a copy of this query with the specified filter.
|
TopNQuery |
withGranularity(Granularity granularity)
Returns a copy of this query with the specified time grain.
|
TopNQuery |
withInnermostDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source on the innermost query.
|
TopNQuery |
withIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals.
|
TopNQuery |
withMetric(TopNMetric metric) |
TopNQuery |
withPostAggregations(Collection<PostAggregation> postAggregations)
Returns a copy of this query with the specified post aggregations.
|
getAggregations, getPostAggregationsgetFilter, getGranularity, getIntervalsgetContext, getDataSource, getQueryTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildSchemaColumns, getDependentFieldNames, getInnermostQuery, getInnerQuery, getMetricDimensionsgetFilter, getGranularity, getIntervalsgetContext, getDataSource, getQueryTypeprotected TopNQuery(DataSource dataSource, Granularity granularity, Dimension dimension, Filter filter, Collection<Aggregation> aggregations, Collection<PostAggregation> postAggregations, Collection<org.joda.time.Interval> intervals, long threshold, TopNMetric metric, QueryContext context, boolean doFork)
dataSource - The datasourcegranularity - The granularitydimension - The dimensionfilter - The filteraggregations - The aggregationspostAggregations - The post-aggregationsintervals - The intervalsthreshold - The thresholdmetric - The TopN metriccontext - The contextdoFork - true to fork a new context and bump up the query id, or false to create an exact copy of the
context.public TopNQuery(DataSource dataSource, Granularity granularity, Dimension dimension, Filter filter, Collection<Aggregation> aggregations, Collection<PostAggregation> postAggregations, Collection<org.joda.time.Interval> intervals, long threshold, TopNMetric metric)
dataSource - The datasourcegranularity - The granularitydimension - The dimensionfilter - The filteraggregations - The aggregationspostAggregations - The post-aggregationsintervals - The intervalsthreshold - The thresholdmetric - The TopN metricpublic Dimension getDimension()
public Collection<Dimension> getDimensions()
DruidAggregationQuerygetDimensions in interface DruidAggregationQuery<TopNQuery>getDimensions in class AbstractDruidAggregationQuery<TopNQuery>public long getThreshold()
public TopNMetric getMetric()
public TopNQuery withDataSource(DataSource dataSource)
DruidQuerydataSource - the new data sourcepublic TopNQuery withInnermostDataSource(DataSource dataSource)
DruidQuerydataSource - the new data sourcepublic TopNQuery withMetric(TopNMetric metric)
public TopNQuery withGranularity(Granularity granularity)
DruidFactQuerygranularity - the new time grainpublic TopNQuery withFilter(Filter filter)
DruidFactQueryfilter - the new filterpublic TopNQuery withAggregations(Collection<Aggregation> aggregations)
DruidAggregationQueryaggregations - the new aggregationspublic TopNQuery withPostAggregations(Collection<PostAggregation> postAggregations)
DruidAggregationQuerypostAggregations - the new post aggregationspublic TopNQuery withIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQueryintervals - the new intervalspublic TopNQuery withAllIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQueryAll nested queries are copies of themselves with the specified intervals set.
intervals - the new intervalspublic TopNQuery withContext(QueryContext context)
DruidQuerycontext - the new contextCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.