Class RangeReadContext
java.lang.Object
org.elasticsearch.xpack.esql.datasources.spi.RangeReadContext
Context for a single
RangeAwareFormatReader.readRange(org.elasticsearch.xpack.esql.datasources.spi.StorageObject, org.elasticsearch.xpack.esql.datasources.spi.RangeReadContext) call. Bundles the per-split
parameters and carries an opaque file-level context for cross-split state (e.g. cached
parsed footer metadata).-
Constructor Summary
ConstructorsConstructorDescriptionRangeReadContext(List<String> projectedColumns, int batchSize, long rangeStart, long rangeEnd, List<Attribute> resolvedAttributes, ErrorPolicy errorPolicy) RangeReadContext(List<String> projectedColumns, int batchSize, long rangeStart, long rangeEnd, List<Attribute> resolvedAttributes, ErrorPolicy errorPolicy, Consumer<String> informationalWarningSink) As the above, plusinformationalWarningSink— seeinformationalWarningSink(). -
Method Summary
Modifier and TypeMethodDescriptionintOptional relay for client-visible lenient-policy warnings (seeSkipWarnings) raised while reading this range.longrangeEnd()longvoidsetFileContext(Object fileContext)
-
Constructor Details
-
RangeReadContext
public RangeReadContext(List<String> projectedColumns, int batchSize, long rangeStart, long rangeEnd, List<Attribute> resolvedAttributes, ErrorPolicy errorPolicy) -
RangeReadContext
public RangeReadContext(List<String> projectedColumns, int batchSize, long rangeStart, long rangeEnd, List<Attribute> resolvedAttributes, ErrorPolicy errorPolicy, @Nullable Consumer<String> informationalWarningSink) As the above, plusinformationalWarningSink— seeinformationalWarningSink(). Kept as a separate constructor so the many existing callers (tests, benchmarks) that don't care about relaying warnings off this thread are unaffected.
-
-
Method Details
-
projectedColumns
-
batchSize
public int batchSize() -
rangeStart
public long rangeStart() -
rangeEnd
public long rangeEnd() -
resolvedAttributes
-
errorPolicy
-
informationalWarningSink
Optional relay for client-visible lenient-policy warnings (seeSkipWarnings) raised while reading this range.nullmeans the reader should fall back to emitting warnings directly viaHeaderWarning, which is only correct when the read runs on the request/driver thread. Callers that dispatchreadRangeto a background thread (e.g.AsyncExternalSourceOperatorFactory) must set this to a sink so the warning is relayed back and re-emitted on the correct thread instead of being silently dropped. SeeFormatReadContext.informationalWarningSink()for the non-range-read counterpart. -
fileContext
-
setFileContext
-