public class GroupByQuery extends AbstractDruidAggregationQuery<GroupByQuery>
aggregations, dimensions, postAggregations
filter, granularity, intervals
context, dataSource, queryType
Modifier | Constructor and Description |
---|---|
|
GroupByQuery(DataSource dataSource,
Granularity granularity,
Collection<Dimension> dimensions,
Filter filter,
Having having,
Collection<Aggregation> aggregations,
Collection<PostAggregation> postAggregations,
Collection<org.joda.time.Interval> intervals,
LimitSpec limitSpec)
Constructor.
|
protected |
GroupByQuery(DataSource dataSource,
Granularity granularity,
Collection<Dimension> dimensions,
Filter filter,
Having having,
Collection<Aggregation> aggregations,
Collection<PostAggregation> postAggregations,
Collection<org.joda.time.Interval> intervals,
LimitSpec limitSpec,
QueryContext context,
boolean doFork)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Having |
getHaving() |
LimitSpec |
getLimitSpec() |
GroupByQuery |
withAggregations(Collection<Aggregation> aggregations)
Returns a copy of this query with the specified aggregations.
|
GroupByQuery |
withAllIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals set in this and all inner queries.
|
GroupByQuery |
withContext(QueryContext context)
Returns a copy of this query with the specified context.
|
GroupByQuery |
withDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source.
|
GroupByQuery |
withDimensions(Collection<Dimension> dimensions) |
GroupByQuery |
withFilter(Filter filter)
Returns a copy of this query with the specified filter.
|
GroupByQuery |
withGranularity(Granularity granularity)
Returns a copy of this query with the specified time grain.
|
GroupByQuery |
withHaving(Having having) |
GroupByQuery |
withInnermostDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source on the innermost query.
|
GroupByQuery |
withIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals.
|
GroupByQuery |
withLimitSpec(LimitSpec limitSpec) |
GroupByQuery |
withOrderBy(LimitSpec limitSpec) |
GroupByQuery |
withPostAggregations(Collection<PostAggregation> postAggregations)
Returns a copy of this query with the specified post aggregations.
|
getAggregations, getDimensions, getPostAggregations
getFilter, getGranularity, getIntervals
getContext, getDataSource, getQueryType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildSchemaColumns, getDependentFieldNames, getInnermostQuery, getInnerQuery, getMetricDimensions
getFilter, getGranularity, getIntervals
getContext, getDataSource, getQueryType
protected GroupByQuery(DataSource dataSource, Granularity granularity, Collection<Dimension> dimensions, Filter filter, Having having, Collection<Aggregation> aggregations, Collection<PostAggregation> postAggregations, Collection<org.joda.time.Interval> intervals, LimitSpec limitSpec, QueryContext context, boolean doFork)
dataSource
- The datasourcegranularity
- The granularitydimensions
- The dimensionsfilter
- The filterhaving
- The having clauseaggregations
- The aggregationspostAggregations
- The post-aggregationsintervals
- The intervalslimitSpec
- The limit specificationcontext
- 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 GroupByQuery(DataSource dataSource, Granularity granularity, Collection<Dimension> dimensions, Filter filter, Having having, Collection<Aggregation> aggregations, Collection<PostAggregation> postAggregations, Collection<org.joda.time.Interval> intervals, LimitSpec limitSpec)
dataSource
- The datasourcegranularity
- The granularitydimensions
- The dimensionsfilter
- The filterhaving
- The having clauseaggregations
- The aggregationspostAggregations
- The post-aggregationsintervals
- The intervalslimitSpec
- The limit specificationpublic Having getHaving()
public LimitSpec getLimitSpec()
public GroupByQuery withDataSource(DataSource dataSource)
DruidQuery
dataSource
- the new data sourcepublic GroupByQuery withInnermostDataSource(DataSource dataSource)
DruidQuery
dataSource
- the new data sourcepublic GroupByQuery withDimensions(Collection<Dimension> dimensions)
public GroupByQuery withGranularity(Granularity granularity)
DruidFactQuery
granularity
- the new time grainpublic GroupByQuery withFilter(Filter filter)
DruidFactQuery
filter
- the new filterpublic GroupByQuery withHaving(Having having)
public GroupByQuery withLimitSpec(LimitSpec limitSpec)
public GroupByQuery withAggregations(Collection<Aggregation> aggregations)
DruidAggregationQuery
aggregations
- the new aggregationspublic GroupByQuery withPostAggregations(Collection<PostAggregation> postAggregations)
DruidAggregationQuery
postAggregations
- the new post aggregationspublic GroupByQuery withIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQuery
intervals
- the new intervalspublic GroupByQuery withAllIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQuery
All nested queries are copies of themselves with the specified intervals set.
intervals
- the new intervalspublic GroupByQuery withOrderBy(LimitSpec limitSpec)
public GroupByQuery withContext(QueryContext context)
DruidQuery
context
- the new contextCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.