Javadoc
On
#moveToNext() and
#mark(), this class copies all column values into a set of
SettableColumnValueSelector instances. Alternative approach was to save only offset in column and use the same
column value selectors as in
QueryableIndexStorageAdapter. The approach with "caching" in
SettableColumnValueSelectors is chosen for two reasons:
1) Avoid re-reading column values from serialized format multiple times (because they are accessed multiple times)
For comparison, it's not a factor for
QueryableIndexStorageAdapter because during query processing,
column values are usually accessed just once per offset, if aggregator or query runner are written sanely.
Avoiding re-reads is especially important for object columns, because object deserialization is potentially
expensive.
2)
#mark() is a "lookbehind" style functionality, in compressed columnar format, that would cause
repetitive excessive decompressions on the block boundaries. E. g. see
org.apache.druid.segment.data.BlockLayoutColumnarDoublesSupplier and similar classes. Some special support for
"lookbehind" could be added to these classes, but it's significant extra complexity.