Package org.apache.druid.segment
Interface TimeBoundaryInspector
- All Known Implementing Classes:
IncrementalIndexTimeBoundaryInspector,QueryableIndexTimeBoundaryInspector,WrappedTimeBoundaryInspector
public interface TimeBoundaryInspector
Returns min/max values of
ColumnHolder.TIME_COLUMN_NAME for a segment. Typically retrieved from
Segment.as(Class).
Only offered by segments that are able to provide more detailed min/max values via metadata inspection than are
available from Segment.getDataInterval().-
Method Summary
Modifier and TypeMethodDescriptionorg.joda.time.DateTimeUpper bound onColumnHolder.TIME_COLUMN_NAME.default org.joda.time.IntervalSmallest interval that containsgetMinTime()andgetMaxTime().org.joda.time.DateTimeLower bound onColumnHolder.TIME_COLUMN_NAME.booleanWhether the lower and upper bounds returned bygetMinTime()andgetMaxTime()are actually found in the dataset.
-
Method Details
-
getMinTime
org.joda.time.DateTime getMinTime()Lower bound onColumnHolder.TIME_COLUMN_NAME. Matches the lowest timestamp in the dataset ifisMinMaxExact(). -
getMaxTime
org.joda.time.DateTime getMaxTime()Upper bound onColumnHolder.TIME_COLUMN_NAME. Strict ifisMinMaxExact(). Matches the highest timestamp in the dataset ifisMinMaxExact(). -
getMinMaxInterval
default org.joda.time.Interval getMinMaxInterval()Smallest interval that containsgetMinTime()andgetMaxTime(). The endpoint is one millisecond higher thangetMaxTime(). -
isMinMaxExact
boolean isMinMaxExact()Whether the lower and upper bounds returned bygetMinTime()andgetMaxTime()are actually found in the dataset. If true, the bounds are strict and can be used substitutes for aggregationsMIN(__time)andMAX(__time).
-