public class LookbackQuery extends AbstractDruidAggregationQuery<LookbackQuery>
| Modifier and Type | Class and Description |
|---|---|
static class |
LookbackQuery.LookbackQueryRequestedIntervalsFunction
The function to get requestedIntervals from a LookbackQuery.
|
aggregations, dimensions, postAggregationsfilter, granularity, intervalscontext, dataSource, queryType| Constructor and Description |
|---|
LookbackQuery(DataSource dataSource,
Collection<PostAggregation> postAggregations,
QueryContext context,
Collection<org.joda.time.Period> lookbackOffsets,
Collection<String> lookbackPrefixes,
Having having,
LimitSpec limitSpec)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Aggregation> |
getAggregations()
Returns the aggregations of the query.
|
Collection<Dimension> |
getDimensions()
Returns the dimensions of the query if any.
|
Filter |
getFilter()
Returns the filter object of the query.
|
Granularity |
getGranularity()
Returns the time grain (granularity) of the query.
|
Having |
getHaving() |
Optional<? extends DruidAggregationQuery> |
getInnerQuery()
If this query is nestable, and has a nested query return it.
|
List<org.joda.time.Interval> |
getIntervals()
Returns the intervals of the query.
|
LimitSpec |
getLimitSpec() |
List<String> |
getlookbackOffsets()
Get the collection of lookback offsets.
|
Collection<org.joda.time.Period> |
getLookbackOffsets() |
Collection<PostAggregation> |
getLookbackPostAggregations() |
Collection<String> |
getLookbackPrefixes() |
Collection<PostAggregation> |
getPostAggregations()
Returns the post-aggregations of the query.
|
LookbackQuery |
withAggregations(Collection<Aggregation> aggregations)
Returns a copy of this query with the specified aggregations.
|
LookbackQuery |
withAllIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals set in this and all inner queries.
|
LookbackQuery |
withContext(QueryContext context)
Returns a copy of this query with the specified context.
|
LookbackQuery |
withDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source.
|
LookbackQuery |
withFilter(Filter filter)
Returns a copy of this query with the specified filter.
|
LookbackQuery |
withGranularity(Granularity granularity)
Returns a copy of this query with the specified time grain.
|
LookbackQuery |
withHaving(Having having) |
LookbackQuery |
withInnermostDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source on the innermost query.
|
LookbackQuery |
withInnerQueryPostAggregations(Collection<PostAggregation> postAggregations)
Update the postAggregations of the nested inner query.
|
LookbackQuery |
withIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals.
|
LookbackQuery |
withLookbackOffsets(List<org.joda.time.Period> lookbackOffsets) |
LookbackQuery |
withLookbackPrefix(List<String> lookbackPrefixes) |
LookbackQuery |
withLookbackQueryPostAggregations(Collection<PostAggregation> postAggregations)
Update the postAggregations of the LookbackQuery(outer query).
|
LookbackQuery |
withOrderBy(LimitSpec limitSpec) |
LookbackQuery |
withPostAggregations(Collection<PostAggregation> postAggregations)
Returns a copy of this query with the specified post aggregations.
|
getContext, getDataSource, getQueryTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildSchemaColumns, getDependentFieldNames, getInnermostQuery, getMetricDimensionsgetContext, getDataSource, getQueryTypepublic LookbackQuery(DataSource dataSource, Collection<PostAggregation> postAggregations, QueryContext context, Collection<org.joda.time.Period> lookbackOffsets, Collection<String> lookbackPrefixes, Having having, LimitSpec limitSpec)
dataSource - DataSource for the querypostAggregations - Post-aggregation operation trees for the querycontext - Query contextlookbackOffsets - Set of period offsetslookbackPrefixes - Set of prefixes for the lookback queries (should match the lookbackOffsets)having - Having clause to apply to the result querylimitSpec - Limit spec to apply to the result querypublic Optional<? extends DruidAggregationQuery> getInnerQuery()
DruidQuerypublic Having getHaving()
public LimitSpec getLimitSpec()
public Collection<String> getLookbackPrefixes()
public Collection<org.joda.time.Period> getLookbackOffsets()
public List<String> getlookbackOffsets()
public Granularity getGranularity()
DruidFactQuerygetGranularity in interface DruidFactQuery<LookbackQuery>getGranularity in class AbstractDruidFactQuery<LookbackQuery>public Set<Aggregation> getAggregations()
DruidAggregationQuerygetAggregations in interface DruidAggregationQuery<LookbackQuery>getAggregations in class AbstractDruidAggregationQuery<LookbackQuery>public Filter getFilter()
DruidFactQuerygetFilter in interface DruidFactQuery<LookbackQuery>getFilter in class AbstractDruidFactQuery<LookbackQuery>public List<org.joda.time.Interval> getIntervals()
DruidFactQuerygetIntervals in interface DruidFactQuery<LookbackQuery>getIntervals in class AbstractDruidFactQuery<LookbackQuery>public Collection<Dimension> getDimensions()
DruidAggregationQuerygetDimensions in interface DruidAggregationQuery<LookbackQuery>getDimensions in class AbstractDruidAggregationQuery<LookbackQuery>public Collection<PostAggregation> getLookbackPostAggregations()
public Collection<PostAggregation> getPostAggregations()
DruidAggregationQuerygetPostAggregations in interface DruidAggregationQuery<LookbackQuery>getPostAggregations in class AbstractDruidAggregationQuery<LookbackQuery>public LookbackQuery withAggregations(Collection<Aggregation> aggregations)
DruidAggregationQueryaggregations - the new aggregationspublic LookbackQuery withPostAggregations(Collection<PostAggregation> postAggregations)
DruidAggregationQuerypostAggregations - the new post aggregationspublic LookbackQuery withInnerQueryPostAggregations(Collection<PostAggregation> postAggregations)
postAggregations - A Collection of PostAggregationspublic LookbackQuery withLookbackQueryPostAggregations(Collection<PostAggregation> postAggregations)
postAggregations - A Collection of PostAggregationspublic LookbackQuery withGranularity(Granularity granularity)
DruidFactQuerygranularity - the new time grainpublic LookbackQuery withFilter(Filter filter)
DruidFactQueryfilter - the new filterpublic LookbackQuery withIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQueryintervals - the new intervalspublic LookbackQuery withAllIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQueryAll nested queries are copies of themselves with the specified intervals set.
intervals - the new intervalspublic LookbackQuery withDataSource(DataSource dataSource)
DruidQuerydataSource - the new data sourcepublic LookbackQuery withInnermostDataSource(DataSource dataSource)
DruidQuerydataSource - the new data sourcepublic LookbackQuery withContext(QueryContext context)
DruidQuerycontext - the new contextpublic LookbackQuery withOrderBy(LimitSpec limitSpec)
public LookbackQuery withHaving(Having having)
public LookbackQuery withLookbackPrefix(List<String> lookbackPrefixes)
public LookbackQuery withLookbackOffsets(List<org.joda.time.Period> lookbackOffsets)
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.