public class DruidSearchQuery extends AbstractDruidFactQuery<DruidSearchQuery>
Modifier and Type | Field and Description |
---|---|
protected Integer |
limit |
protected SearchQuerySpec |
query |
protected Collection<Dimension> |
searchDimensions |
protected SearchSortDirection |
sort |
filter, granularity, intervals
context, dataSource, queryType
Modifier | Constructor and Description |
---|---|
|
DruidSearchQuery(DataSource dataSource,
Granularity granularity,
Filter filter,
Collection<org.joda.time.Interval> intervals,
Collection<Dimension> searchDimensions,
SearchQuerySpec query,
SearchSortDirection sort,
Integer limit)
Constructor.
|
protected |
DruidSearchQuery(DataSource dataSource,
Granularity granularity,
Filter filter,
Collection<org.joda.time.Interval> intervals,
Collection<Dimension> searchDimensions,
SearchQuerySpec query,
SearchSortDirection sort,
Integer limit,
QueryContext context,
boolean doFork)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Integer |
getLimit() |
SearchQuerySpec |
getQuery() |
Collection<Dimension> |
getSearchDimensions() |
SearchSortDirection |
getSort() |
DruidSearchQuery |
withAllIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals set in this and all inner queries.
|
DruidSearchQuery |
withContext(QueryContext context)
Returns a copy of this query with the specified context.
|
DruidSearchQuery |
withDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source.
|
DruidSearchQuery |
withFilter(Filter filter)
Returns a copy of this query with the specified filter.
|
DruidSearchQuery |
withGranularity(Granularity granularity)
Returns a copy of this query with the specified time grain.
|
DruidSearchQuery |
withInnermostDataSource(DataSource dataSource)
Returns a copy of this query with the specified data source on the innermost query.
|
DruidSearchQuery |
withIntervals(Collection<org.joda.time.Interval> intervals)
Returns a copy of this query with the specified intervals.
|
getFilter, getGranularity, getIntervals
getContext, getDataSource, getQueryType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInnermostQuery, getInnerQuery
getContext, getDataSource, getQueryType
protected final Collection<Dimension> searchDimensions
protected final SearchQuerySpec query
protected final SearchSortDirection sort
protected final Integer limit
protected DruidSearchQuery(DataSource dataSource, Granularity granularity, Filter filter, Collection<org.joda.time.Interval> intervals, Collection<Dimension> searchDimensions, SearchQuerySpec query, SearchSortDirection sort, Integer limit, QueryContext context, boolean doFork)
dataSource
- DataSource for the querygranularity
- Granularity for the queryfilter
- Filter for the queryintervals
- Intervals for the querysearchDimensions
- Search Dimensions for the query to search overquery
- Specification for what to search forsort
- Sort definition for the querylimit
- Limit definition for the querycontext
- Query contextdoFork
- Should this query count it's forkpublic DruidSearchQuery(DataSource dataSource, Granularity granularity, Filter filter, Collection<org.joda.time.Interval> intervals, Collection<Dimension> searchDimensions, SearchQuerySpec query, SearchSortDirection sort, Integer limit)
Note that the query constructed here does not count it's forks and has no default query context.
dataSource
- DataSource for the querygranularity
- Granularity for the queryfilter
- Filter for the queryintervals
- Intervals for the querysearchDimensions
- Search Dimensions for the query to search overquery
- Specification for what to search forsort
- Sort definition for the querylimit
- Limit definition for the querypublic Collection<Dimension> getSearchDimensions()
public SearchQuerySpec getQuery()
public SearchSortDirection getSort()
public Integer getLimit()
public DruidSearchQuery withDataSource(DataSource dataSource)
DruidQuery
dataSource
- the new data sourcepublic DruidSearchQuery withInnermostDataSource(DataSource dataSource)
DruidQuery
dataSource
- the new data sourcepublic DruidSearchQuery withGranularity(Granularity granularity)
DruidFactQuery
granularity
- the new time grainpublic DruidSearchQuery withFilter(Filter filter)
DruidFactQuery
filter
- the new filterpublic DruidSearchQuery withIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQuery
intervals
- the new intervalspublic DruidSearchQuery withAllIntervals(Collection<org.joda.time.Interval> intervals)
DruidFactQuery
All nested queries are copies of themselves with the specified intervals set.
intervals
- the new intervalspublic DruidSearchQuery withContext(QueryContext context)
DruidQuery
context
- the new contextCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.