public class SqlAggregationQuery extends AbstractDruidAggregationQuery<SqlAggregationQuery>
DruidAggregationQuery
which always reports
itself as a DefaultQueryType.GROUP_BY
.aggregations, dimensions, postAggregations
filter, granularity, intervals
context, dataSource, queryType
Constructor and Description |
---|
SqlAggregationQuery(DruidAggregationQuery<?> query)
Wraps a query as a GroupBy Query.
|
Modifier and Type | Method and Description |
---|---|
SqlAggregationQuery |
withAggregations(Collection<Aggregation> aggregations)
Returns a copy of this query with the specified aggregations.
|
SqlAggregationQuery |
withAllIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals set in this and all inner queries.
|
SqlAggregationQuery |
withContext(QueryContext context)
Returns a copy of this query with the specified context.
|
SqlAggregationQuery |
withDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source.
|
SqlAggregationQuery |
withDimensions(Collection<Dimension> dimensions) |
SqlAggregationQuery |
withFilter(Filter filter)
Returns a copy of this query with the specified filter.
|
SqlAggregationQuery |
withGranularity(Granularity granularity)
Returns a copy of this query with the specified time grain.
|
SqlAggregationQuery |
withHaving(Having having) |
SqlAggregationQuery |
withInnermostDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source on the innermost query.
|
SqlAggregationQuery |
withIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals.
|
SqlAggregationQuery |
withLimitSpec(LimitSpec limitSpec) |
SqlAggregationQuery |
withOrderBy(LimitSpec limitSpec) |
SqlAggregationQuery |
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
public SqlAggregationQuery(DruidAggregationQuery<?> query)
query
- The query to wrap.public SqlAggregationQuery withDataSource(DataSource dataSource)
DruidQuery
dataSource
- the new data sourcepublic SqlAggregationQuery withInnermostDataSource(DataSource dataSource)
DruidQuery
dataSource
- the new data sourcepublic SqlAggregationQuery withDimensions(Collection<Dimension> dimensions)
public SqlAggregationQuery withGranularity(Granularity granularity)
DruidFactQuery
granularity
- the new time grainpublic SqlAggregationQuery withFilter(Filter filter)
DruidFactQuery
filter
- the new filterpublic SqlAggregationQuery withHaving(Having having)
public SqlAggregationQuery withLimitSpec(LimitSpec limitSpec)
public SqlAggregationQuery withAggregations(Collection<Aggregation> aggregations)
DruidAggregationQuery
aggregations
- the new aggregationspublic SqlAggregationQuery withPostAggregations(Collection<PostAggregation> postAggregations)
DruidAggregationQuery
postAggregations
- the new post aggregationspublic SqlAggregationQuery withIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQuery
intervals
- the new intervalspublic SqlAggregationQuery withAllIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQuery
All nested queries are copies of themselves with the specified intervals set.
intervals
- the new intervalspublic SqlAggregationQuery withOrderBy(LimitSpec limitSpec)
public SqlAggregationQuery withContext(QueryContext context)
DruidQuery
context
- the new contextCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.