Class PassThroughRowPositionStrategy
java.lang.Object
org.elasticsearch.xpack.esql.datasources.spi.PassThroughRowPositionStrategy
- All Implemented Interfaces:
RowPositionStrategy
Strategy for readers that natively populate the
_rowPosition slot inside their own
page-emitting iterator (parquet-mr, ORC, CSV, NDJSON). apply(org.elasticsearch.compute.operator.CloseableIterator<org.elasticsearch.compute.data.Page>, int) returns the inner
iterator unchanged — the work is already done before the dispatcher calls into the strategy.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionapply(CloseableIterator<Page> inner, int rowPositionSlot) Wrap (or pass through) the reader's inner page iterator so each page has the_rowPositionslot populated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.datasources.spi.RowPositionStrategy
reason
-
Field Details
-
INSTANCE
-
-
Method Details
-
apply
Description copied from interface:RowPositionStrategyWrap (or pass through) the reader's inner page iterator so each page has the_rowPositionslot populated. Validates any preconditions this strategy requires; throwsIllegalStateExceptionwhen a precondition is unmet (e.g. byte-offset strategy called with no decompressed anchor).- Specified by:
applyin interfaceRowPositionStrategy- Parameters:
rowPositionSlot- the index in the projected output where_rowPositionsits, or-1when_rowPositionis not in the projection. The dispatcher pre-computes this once perreader.read()so strategies inspect a primitive instead of walking a list per call.
-