Class PassThroughRowPositionStrategy

java.lang.Object
org.elasticsearch.xpack.esql.datasources.spi.PassThroughRowPositionStrategy
All Implemented Interfaces:
RowPositionStrategy

public final class PassThroughRowPositionStrategy extends Object implements 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 Details

  • Method Details

    • apply

      public CloseableIterator<Page> apply(CloseableIterator<Page> inner, int rowPositionSlot)
      Description copied from interface: RowPositionStrategy
      Wrap (or pass through) the reader's inner page iterator so each page has the _rowPosition slot populated. Validates any preconditions this strategy requires; throws IllegalStateException when a precondition is unmet (e.g. byte-offset strategy called with no decompressed anchor).
      Specified by:
      apply in interface RowPositionStrategy
      Parameters:
      rowPositionSlot - the index in the projected output where _rowPosition sits, or -1 when _rowPosition is not in the projection. The dispatcher pre-computes this once per reader.read() so strategies inspect a primitive instead of walking a list per call.