Interface ColumnExtractorAware


public interface ColumnExtractorAware
Capability marker for FormatReader implementations that can re-read columns positionally after the primary forward scan.

Presence of this interface is the capability signal: planners use instanceof ColumnExtractorAware rather than a separate flag. Readers without cheap random access simply omit it. This stays orthogonal to FormatReader.filterPushdownSupport(), FormatReader.aggregatePushdownSupport(), and FormatReader.withPushedFilter(Object) — deferred extraction is an additional optional path layered on the same configured reader.

When supported, the planner narrows the scan for SORT … | LIMIT-style queries and relies on InsertExternalFieldExtraction ( org.elasticsearch.xpack.esql.optimizer.rules.physical.local.InsertExternalFieldExtraction) plus SourceExtractors (org.elasticsearch.xpack.esql.datasources.SourceExtractors) to reload deferred fields above TopN.

The runtime handshake — actually producing a ColumnExtractor matched to a specific forward-scan iterator — is expressed by ColumnExtractorProducer, which the reader's iterator implements when it emits ColumnExtractor.ROW_POSITION_COLUMN.