Class TimeAndDimsPointer

java.lang.Object
org.apache.druid.segment.TimeAndDimsPointer
All Implemented Interfaces:
Comparable<TimeAndDimsPointer>
Direct Known Subclasses:
RowPointer

public class TimeAndDimsPointer extends Object implements Comparable<TimeAndDimsPointer>
TimeAndDimsPointer is used in conjunction with TimeAndDimsIterator, it's an _immutable_ object that points to different logical data points, as TimeAndDimsIterator.moveToNext() is called. TimeAndDimsPointers are comparable by time and dimension column values, but excluding metric column values, to facilicate ordering and rollup during merging of collections of rows (see IndexMergerBase.merge(java.util.List<org.apache.druid.segment.IndexableAdapter>, boolean, org.apache.druid.query.aggregation.AggregatorFactory[], java.io.File, org.apache.druid.data.input.impl.DimensionsSpec, org.apache.druid.segment.IndexSpec, int) methods). The difference between "time and dims" and "row" abstraction (see IncrementalIndexRow, RowPointer) is that "time and dims" is logical composite of only time point and dimension and metric values, not tied to a specific position in any data structure (aka "row index"). TimeAndDimsPointer is conceptually similar to Cursor, but the latter is used for query execution rather than historical segments creation (as TimeAndDimsPointer). If those abstractions could be collapsed (and if it is worthwhile) is yet to be determined.
  • Method Details