Record Class SourceOperatorContext
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.spi.SourceOperatorContext
public record SourceOperatorContext(String sourceType, StoragePath path, List<String> projectedColumns, List<Attribute> attributes, int batchSize, int maxBufferSize, int rowLimit, Executor executor, Executor fileReadExecutor, Map<String,Object> config, Map<String,Object> sourceMetadata, Object pushedFilter, List<Expression> pushedExpressions, FileList fileList, Map<StoragePath,SchemaReconciliation.FileSchemaInfo> schemaMap, ExternalSplit split, Set<String> partitionColumnNames, ExternalSliceQueue sliceQueue, int parsingParallelism, int maxConcurrentOpenSegments, int maxRecordBytes, int parallelism, String datasetName, boolean deferredExtraction, DeclaredReadSpec declaredReadSpec)
extends Record
Context for creating source operator factories.
Uses Java record for immutability and automatic equals/hashCode/toString.
Note: Record accessors have no "get" prefix per project conventions.
This context is passed to SourceOperatorFactoryProvider implementations
to provide all necessary information for creating a source operator factory.
For table-based sources (Iceberg, Delta Lake), the sourceMetadata() map
contains opaque source-specific data (like native schema) that the operator factory
needs but core doesn't interpret.
The pushedFilter() contains an opaque filter object that was pushed down
during optimization. Since external sources execute on coordinator only, this filter
is never serialized - it's created during local physical optimization and consumed
immediately by the operator factory in the same JVM.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSingle source of truth for themax_concurrent_open_segmentsdefault. -
Constructor Summary
ConstructorsConstructorDescriptionSourceOperatorContext(String sourceType, StoragePath path, List<String> projectedColumns, List<Attribute> attributes, int batchSize, int maxBufferSize, int rowLimit, Executor executor, Executor fileReadExecutor, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, List<Expression> pushedExpressions, FileList fileList, Map<StoragePath, SchemaReconciliation.FileSchemaInfo> schemaMap, ExternalSplit split, Set<String> partitionColumnNames, ExternalSliceQueue sliceQueue, int parsingParallelism, int maxConcurrentOpenSegments, int maxRecordBytes, int parallelism, String datasetName, boolean deferredExtraction, DeclaredReadSpec declaredReadSpec) Creates an instance of aSourceOperatorContextrecord class.SourceOperatorContext(String sourceType, StoragePath path, List<String> projectedColumns, List<Attribute> attributes, int batchSize, int maxBufferSize, Executor executor, Map<String, Object> config) SourceOperatorContext(String sourceType, StoragePath path, List<String> projectedColumns, List<Attribute> attributes, int batchSize, int maxBufferSize, Executor executor, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter) SourceOperatorContext(String sourceType, StoragePath path, List<String> projectedColumns, List<Attribute> attributes, int batchSize, int maxBufferSize, Executor executor, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, FileList fileList) SourceOperatorContext(String sourceType, StoragePath path, List<String> projectedColumns, List<Attribute> attributes, int batchSize, int maxBufferSize, Executor executor, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, FileList fileList, ExternalSplit split) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.intReturns the value of thebatchSizerecord component.builder()config()Returns the value of theconfigrecord component.Returns the value of thedatasetNamerecord component.Returns the value of thedeclaredReadSpecrecord component.booleanReturns the value of thedeferredExtractionrecord component.final booleanIndicates whether some other object is "equal to" this one.executor()Returns the value of theexecutorrecord component.fileList()Returns the value of thefileListrecord component.Returns the value of thefileReadExecutorrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxBufferSizerecord component.intReturns the value of themaxConcurrentOpenSegmentsrecord component.intReturns the value of themaxRecordBytesrecord component.intReturns the value of theparallelismrecord component.intReturns the value of theparsingParallelismrecord component.Returns the value of thepartitionColumnNamesrecord component.path()Returns the value of thepathrecord component.Returns the value of theprojectedColumnsrecord component.Returns the value of thepushedExpressionsrecord component.Returns the value of thepushedFilterrecord component.introwLimit()Returns the value of therowLimitrecord component.Returns the value of theschemaMaprecord component.Returns the value of thesliceQueuerecord component.Returns the value of thesourceMetadatarecord component.Returns the value of thesourceTyperecord component.split()Returns the value of thesplitrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_MAX_CONCURRENT_OPEN_SEGMENTS
public static final int DEFAULT_MAX_CONCURRENT_OPEN_SEGMENTSSingle source of truth for themax_concurrent_open_segmentsdefault. Lives in this SPI (leaf) layer so both theQueryPragmassetting and the datasources-side fallback defaults reference it withoutdatasourceshaving to depend onplugin. Change here and it propagates.- See Also:
-
-
Constructor Details
-
SourceOperatorContext
public SourceOperatorContext(String sourceType, StoragePath path, List<String> projectedColumns, List<Attribute> attributes, int batchSize, int maxBufferSize, int rowLimit, Executor executor, @Nullable Executor fileReadExecutor, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, List<Expression> pushedExpressions, FileList fileList, Map<StoragePath, SchemaReconciliation.FileSchemaInfo> schemaMap, @Nullable ExternalSplit split, Set<String> partitionColumnNames, @Nullable ExternalSliceQueue sliceQueue, int parsingParallelism, int maxConcurrentOpenSegments, int maxRecordBytes, int parallelism, @Nullable String datasetName, boolean deferredExtraction, DeclaredReadSpec declaredReadSpec) Creates an instance of aSourceOperatorContextrecord class.- Parameters:
sourceType- the value for thesourceTyperecord componentpath- the value for thepathrecord componentprojectedColumns- the value for theprojectedColumnsrecord componentattributes- the value for theattributesrecord componentbatchSize- the value for thebatchSizerecord componentmaxBufferSize- the value for themaxBufferSizerecord componentrowLimit- the value for therowLimitrecord componentexecutor- the value for theexecutorrecord componentfileReadExecutor- the value for thefileReadExecutorrecord componentconfig- the value for theconfigrecord componentsourceMetadata- the value for thesourceMetadatarecord componentpushedFilter- the value for thepushedFilterrecord componentpushedExpressions- the value for thepushedExpressionsrecord componentfileList- the value for thefileListrecord componentschemaMap- the value for theschemaMaprecord componentsplit- the value for thesplitrecord componentpartitionColumnNames- the value for thepartitionColumnNamesrecord componentsliceQueue- the value for thesliceQueuerecord componentparsingParallelism- the value for theparsingParallelismrecord componentmaxConcurrentOpenSegments- the value for themaxConcurrentOpenSegmentsrecord componentmaxRecordBytes- the value for themaxRecordBytesrecord componentparallelism- the value for theparallelismrecord componentdatasetName- the value for thedatasetNamerecord componentdeferredExtraction- the value for thedeferredExtractionrecord componentdeclaredReadSpec- the value for thedeclaredReadSpecrecord component
-
SourceOperatorContext
public SourceOperatorContext(String sourceType, StoragePath path, List<String> projectedColumns, List<Attribute> attributes, int batchSize, int maxBufferSize, Executor executor, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, FileList fileList, @Nullable ExternalSplit split) -
SourceOperatorContext
-
SourceOperatorContext
-
SourceOperatorContext
-
-
Method Details
-
builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sourceType
Returns the value of thesourceTyperecord component.- Returns:
- the value of the
sourceTyperecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
projectedColumns
Returns the value of theprojectedColumnsrecord component.- Returns:
- the value of the
projectedColumnsrecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
batchSize
public int batchSize()Returns the value of thebatchSizerecord component.- Returns:
- the value of the
batchSizerecord component
-
maxBufferSize
public int maxBufferSize()Returns the value of themaxBufferSizerecord component.- Returns:
- the value of the
maxBufferSizerecord component
-
rowLimit
public int rowLimit()Returns the value of therowLimitrecord component.- Returns:
- the value of the
rowLimitrecord component
-
executor
Returns the value of theexecutorrecord component.- Returns:
- the value of the
executorrecord component
-
fileReadExecutor
Returns the value of thefileReadExecutorrecord component.- Returns:
- the value of the
fileReadExecutorrecord component
-
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-
sourceMetadata
Returns the value of thesourceMetadatarecord component.- Returns:
- the value of the
sourceMetadatarecord component
-
pushedFilter
Returns the value of thepushedFilterrecord component.- Returns:
- the value of the
pushedFilterrecord component
-
pushedExpressions
Returns the value of thepushedExpressionsrecord component.- Returns:
- the value of the
pushedExpressionsrecord component
-
fileList
Returns the value of thefileListrecord component.- Returns:
- the value of the
fileListrecord component
-
schemaMap
Returns the value of theschemaMaprecord component.- Returns:
- the value of the
schemaMaprecord component
-
split
Returns the value of thesplitrecord component.- Returns:
- the value of the
splitrecord component
-
partitionColumnNames
Returns the value of thepartitionColumnNamesrecord component.- Returns:
- the value of the
partitionColumnNamesrecord component
-
sliceQueue
Returns the value of thesliceQueuerecord component.- Returns:
- the value of the
sliceQueuerecord component
-
parsingParallelism
public int parsingParallelism()Returns the value of theparsingParallelismrecord component.- Returns:
- the value of the
parsingParallelismrecord component
-
maxConcurrentOpenSegments
public int maxConcurrentOpenSegments()Returns the value of themaxConcurrentOpenSegmentsrecord component.- Returns:
- the value of the
maxConcurrentOpenSegmentsrecord component
-
maxRecordBytes
public int maxRecordBytes()Returns the value of themaxRecordBytesrecord component.- Returns:
- the value of the
maxRecordBytesrecord component
-
parallelism
public int parallelism()Returns the value of theparallelismrecord component.- Returns:
- the value of the
parallelismrecord component
-
datasetName
Returns the value of thedatasetNamerecord component.- Returns:
- the value of the
datasetNamerecord component
-
deferredExtraction
public boolean deferredExtraction()Returns the value of thedeferredExtractionrecord component.- Returns:
- the value of the
deferredExtractionrecord component
-
declaredReadSpec
Returns the value of thedeclaredReadSpecrecord component.- Returns:
- the value of the
declaredReadSpecrecord component
-