Package io.trino.operator
Class RowReferencePageManager.LoadCursor
java.lang.Object
io.trino.operator.RowReferencePageManager.LoadCursor
- All Implemented Interfaces:
RowReference,AutoCloseable
- Enclosing class:
RowReferencePageManager
public static final class RowReferencePageManager.LoadCursor
extends Object
implements RowReference, AutoCloseable
Cursor that allows callers to advance through the registered page and dictate whether a specific position should
be preserved with a stable row ID. Row ID generation can be expensive in tight loops, so this allows callers to
quickly skip positions that won't be needed.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanadvance()longAllocate a stable row ID that can be used to reference this row at a future point.voidclose()intcompareTo(RowIdComparisonStrategy strategy, long rowId) Compares the referenced row to the specified row ID using the provided RowIdComparisonStrategy.booleanequals(RowIdHashStrategy strategy, long rowId) Checks equality of the referenced row with the specified row ID using the provided RowIdHashStrategy.longhash(RowIdHashStrategy strategy) Calculates the hash of the referenced row using the provided RowIdHashStrategy.
-
Method Details
-
advance
public boolean advance() -
compareTo
Description copied from interface:RowReferenceCompares the referenced row to the specified row ID using the provided RowIdComparisonStrategy.- Specified by:
compareToin interfaceRowReference
-
equals
Description copied from interface:RowReferenceChecks equality of the referenced row with the specified row ID using the provided RowIdHashStrategy.- Specified by:
equalsin interfaceRowReference
-
hash
Description copied from interface:RowReferenceCalculates the hash of the referenced row using the provided RowIdHashStrategy.- Specified by:
hashin interfaceRowReference
-
allocateRowId
public long allocateRowId()Description copied from interface:RowReferenceAllocate a stable row ID that can be used to reference this row at a future point.- Specified by:
allocateRowIdin interfaceRowReference
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-