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 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadvance()longallocateRowId()Allocate 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 Detail
-
advance
public boolean advance()
-
compareTo
public int compareTo(RowIdComparisonStrategy strategy, long rowId)
Description copied from interface:RowReferenceCompares the referenced row to the specified row ID using the provided RowIdComparisonStrategy.- Specified by:
compareToin interfaceRowReference
-
equals
public boolean equals(RowIdHashStrategy strategy, long rowId)
Description copied from interface:RowReferenceChecks equality of the referenced row with the specified row ID using the provided RowIdHashStrategy.- Specified by:
equalsin interfaceRowReference
-
hash
public long hash(RowIdHashStrategy strategy)
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
-
-