ColumnReader

One shredded column, read at one snapshot, with every sidecar it may consult pinned.

Where an IndexReader answers "which documents carry this value", a column answers "what value do these documents carry" — and answers it without opening a document, which is the whole reason a column exists next to an inverted index. It also answers ranges, which an inverted index cannot: its terms are ordered for lookup rather than by value.

The same three-part coverage rule applies, from the same place: a segment is usable when it carries this column and its largest sequence is at or below the snapshot's. See SegmentSelection.

Close it. On Windows a mapped file cannot be deleted, so a reader left open blocks reclamation of everything it touched.

Properties

Link copied to clipboard

Covered, stale and total, at this snapshot.

Link copied to clipboard

Whether the store held documents outside a segment when this reader pinned.

Link copied to clipboard

The index this reads.

Link copied to clipboard

Whether the column alone is a superset of the answer.

Link copied to clipboard

The path shredded.

Link copied to clipboard

The snapshot this reader answers at.

Link copied to clipboard

Live segments this reader cannot answer for, which the caller must scan.

Link copied to clipboard

Segments this reader can answer for, ascending. The domain of every accessor below.

Functions

Link copied to clipboard
fun canProject(segmentNumber: Long): Boolean

Whether this segment's column can give values back exactly as the documents wrote them.

fun canProject(segmentNumber: Long, ordinal: Int): Boolean

Whether ordinal's value at path can be read without opening its document.

Link copied to clipboard
open override fun close()
Link copied to clipboard

The physical types the usable segments chose, for diagnostics. One column may differ per segment.

Link copied to clipboard
fun documentOrdinals(segmentNumber: Long): ReadableBitmap

The segment's live-document universe: ordinals whose newest version there is a document.

Link copied to clipboard
fun evaluate(segmentNumber: Long, predicate: ColumnPredicate): ColumnMatch

Evaluates predicate against one segment's column, opening no document.

Link copied to clipboard
fun isUniqueKey(key: Key, exceptSegment: Long): Boolean

Whether key appears in exactly one usable segment.

Link copied to clipboard
fun keyAt(segmentNumber: Long, ordinal: Int): Key

The key at ordinal of segmentNumber. A key-block read, not a document read.

Link copied to clipboard
fun ordinalRange(segmentNumber: Long, from: Key?, to: Key?): IntRange

The ordinals of segmentNumber whose keys lie in [from, to], both bounds inclusive.

Link copied to clipboard
fun presentOrdinals(segmentNumber: Long): ReadableBitmap

Ordinals carrying at least one value at path, whether or not the column stored it.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun valueAt(segmentNumber: Long, ordinal: Int): Variant?

The value at ordinal, or null where the document holds none at path.