public class TimeAndDimsPointer extends Object implements Comparable<TimeAndDimsPointer>
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 IndexMergerV9.merge(java.util.List<org.apache.druid.segment.IndexableAdapter>, boolean, org.apache.druid.query.aggregation.AggregatorFactory[], java.io.File, org.apache.druid.segment.IndexSpec) 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.| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TimeAndDimsPointer rhs)
Compares time column value and dimension column values, but not metric column values.
|
boolean |
equals(Object obj) |
int |
getNumMetrics() |
long |
getTimestamp() |
int |
hashCode() |
String |
toString() |
public long getTimestamp()
public int getNumMetrics()
public int compareTo(@Nonnull TimeAndDimsPointer rhs)
compareTo in interface Comparable<TimeAndDimsPointer>Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.