Class TimeBoundaryQuery
- java.lang.Object
-
- org.apache.druid.query.BaseQuery<Result<TimeBoundaryResultValue>>
-
- org.apache.druid.query.timeboundary.TimeBoundaryQuery
-
- All Implemented Interfaces:
Query<Result<TimeBoundaryResultValue>>
public class TimeBoundaryQuery extends BaseQuery<Result<TimeBoundaryResultValue>>
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAX_TIME
static String
MAX_TIME_ARRAY_OUTPUT_NAME
static String
MIN_TIME
static String
MIN_TIME_ARRAY_OUTPUT_NAME
-
Fields inherited from class org.apache.druid.query.BaseQuery
QUERY_ID, SQL_QUERY_ID, SUB_QUERY_ID
-
Fields inherited from interface org.apache.druid.query.Query
DATASOURCE_METADATA, GROUP_BY, SCAN, SEARCH, SEGMENT_METADATA, SELECT, TIME_BOUNDARY, TIMESERIES, TOPN, UNION_QUERY, WINDOW_OPERATOR
-
-
Constructor Summary
Constructors Constructor Description TimeBoundaryQuery(DataSource dataSource, QuerySegmentSpec querySegmentSpec, String bound, DimFilter dimFilter, Map<String,Object> context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<Result<TimeBoundaryResultValue>>
buildResult(org.joda.time.DateTime timestamp, org.joda.time.DateTime min, org.joda.time.DateTime max)
boolean
equals(Object o)
String
getBound()
byte[]
getCacheKey()
DimFilter
getFilter()
String
getType()
boolean
hasFilters()
int
hashCode()
Iterable<Result<TimeBoundaryResultValue>>
mergeResults(List<Result<TimeBoundaryResultValue>> results)
String
toString()
Query<Result<TimeBoundaryResultValue>>
withDataSource(DataSource dataSource)
TimeBoundaryQuery
withOverriddenContext(Map<String,Object> contextOverrides)
TimeBoundaryQuery
withQuerySegmentSpec(QuerySegmentSpec spec)
Returns a new query, identical to this one, but with a different associatedQuerySegmentSpec
.-
Methods inherited from class org.apache.druid.query.BaseQuery
checkInterrupted, computeOverriddenContext, computeOverridenContext, context, getContext, getDataSource, getDuration, getGranularity, getId, getIntervals, getQuerySegmentSpec, getQuerySegmentSpecForLookUp, getResultOrdering, getRunner, getSubQueryId, getTimezone, withId, withSqlQueryId, withSubQueryId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.Query
getContextBoolean, getContextHumanReadableBytes, getContextValue, getDataSourceAnalysis, getMostSpecificId, getRequiredColumns, getResultRowSignature, getResultRowSignature, getSingleInterval, getSqlQueryId, getVirtualColumns, optimizeForSegment, withDefaultSubQueryId, withLane, withPriority
-
-
-
-
Field Detail
-
MAX_TIME
public static final String MAX_TIME
- See Also:
- Constant Field Values
-
MIN_TIME
public static final String MIN_TIME
- See Also:
- Constant Field Values
-
MAX_TIME_ARRAY_OUTPUT_NAME
public static final String MAX_TIME_ARRAY_OUTPUT_NAME
- See Also:
- Constant Field Values
-
MIN_TIME_ARRAY_OUTPUT_NAME
public static final String MIN_TIME_ARRAY_OUTPUT_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TimeBoundaryQuery
public TimeBoundaryQuery(DataSource dataSource, QuerySegmentSpec querySegmentSpec, String bound, DimFilter dimFilter, Map<String,Object> context)
-
-
Method Detail
-
hasFilters
public boolean hasFilters()
-
getFilter
public DimFilter getFilter()
-
getType
public String getType()
-
getBound
public String getBound()
-
withOverriddenContext
public TimeBoundaryQuery withOverriddenContext(Map<String,Object> contextOverrides)
-
withQuerySegmentSpec
public TimeBoundaryQuery withQuerySegmentSpec(QuerySegmentSpec spec)
Description copied from interface:Query
Returns a new query, identical to this one, but with a different associatedQuerySegmentSpec
.This often changes the behavior of
Query.getRunner(QuerySegmentWalker)
, since most queries inherit that method fromBaseQuery
, which implements it by callingQuerySegmentSpec.lookup(org.apache.druid.query.Query<T>, org.apache.druid.query.QuerySegmentWalker)
.
-
withDataSource
public Query<Result<TimeBoundaryResultValue>> withDataSource(DataSource dataSource)
-
getCacheKey
public byte[] getCacheKey()
-
buildResult
public Iterable<Result<TimeBoundaryResultValue>> buildResult(org.joda.time.DateTime timestamp, org.joda.time.DateTime min, org.joda.time.DateTime max)
-
mergeResults
public Iterable<Result<TimeBoundaryResultValue>> mergeResults(List<Result<TimeBoundaryResultValue>> results)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classBaseQuery<Result<TimeBoundaryResultValue>>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBaseQuery<Result<TimeBoundaryResultValue>>
-
-