Record Class SplitDiscoveryContext
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.spi.SplitDiscoveryContext
- Record Components:
querySchema- the post-prune Query schema (data attributes only, metadata stripped) the query actually materializes. Empty means either all columns are needed or the projection is unknown. Split providers useExternalSchema.names()for membership tests when pruning per-file mappings or skipping files with no column overlap.unifiedSchema- the pre-prune Unified schema, ornullwhen not available. Together withquerySchemaand each file's schema this lets split providers narrow per-fileColumnMappings on the coordinator.isCancelled- polled during split discovery so a long-running enumeration (e.g. thousands of Parquet footer reads) aborts promptly when the originating query is cancelled. Defaults to() -> false("never cancelled") for callers and SPI impls that do not carry aCancellableTask.
public record SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<StoragePath,SchemaReconciliation.FileSchemaInfo> schemaMap, Map<String,Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints, ExternalSchema querySchema, ExternalSchema unifiedSchema, int maxRecordBytes, BooleanSupplier isCancelled, DeclaredReadSpec declaredReadSpec)
extends Record
Context passed to
SplitProvider.discoverSplits(org.elasticsearch.xpack.esql.datasources.spi.SplitDiscoveryContext) containing all information
needed to enumerate and optionally prune splits for an external source.-
Constructor Summary
ConstructorsConstructorDescriptionSplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<String, Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints) SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<String, Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints, ExternalSchema querySchema) SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<StoragePath, SchemaReconciliation.FileSchemaInfo> schemaMap, Map<String, Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints, ExternalSchema querySchema) SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<StoragePath, SchemaReconciliation.FileSchemaInfo> schemaMap, Map<String, Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints, ExternalSchema querySchema, ExternalSchema unifiedSchema, int maxRecordBytes, BooleanSupplier isCancelled, DeclaredReadSpec declaredReadSpec) Creates an instance of aSplitDiscoveryContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the value of theconfigrecord component.Returns the value of thedeclaredReadSpecrecord component.final booleanIndicates whether some other object is "equal to" this one.fileList()Returns the value of thefileListrecord component.Returns the value of thefilterHintsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theisCancelledrecord component.intReturns the value of themaxRecordBytesrecord component.metadata()Returns the value of themetadatarecord component.Returns the value of thepartitionInforecord component.Returns the value of thequerySchemarecord component.Returns the value of theschemaMaprecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunifiedSchemarecord component.
-
Constructor Details
-
SplitDiscoveryContext
public SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<String, Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints) -
SplitDiscoveryContext
public SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<String, Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints, ExternalSchema querySchema) -
SplitDiscoveryContext
public SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<StoragePath, SchemaReconciliation.FileSchemaInfo> schemaMap, Map<String, Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints, ExternalSchema querySchema) -
SplitDiscoveryContext
public SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<StoragePath, SchemaReconciliation.FileSchemaInfo> schemaMap, Map<String, Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints, ExternalSchema querySchema, @Nullable ExternalSchema unifiedSchema, int maxRecordBytes, BooleanSupplier isCancelled, DeclaredReadSpec declaredReadSpec) Creates an instance of aSplitDiscoveryContextrecord class.- Parameters:
metadata- the value for themetadatarecord componentfileList- the value for thefileListrecord componentschemaMap- the value for theschemaMaprecord componentconfig- the value for theconfigrecord componentpartitionInfo- the value for thepartitionInforecord componentfilterHints- the value for thefilterHintsrecord componentquerySchema- the value for thequerySchemarecord componentunifiedSchema- the value for theunifiedSchemarecord componentmaxRecordBytes- the value for themaxRecordBytesrecord componentisCancelled- the value for theisCancelledrecord componentdeclaredReadSpec- the value for thedeclaredReadSpecrecord component
-
-
Method Details
-
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 '=='. -
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord 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
-
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-
partitionInfo
Returns the value of thepartitionInforecord component.- Returns:
- the value of the
partitionInforecord component
-
filterHints
Returns the value of thefilterHintsrecord component.- Returns:
- the value of the
filterHintsrecord component
-
querySchema
Returns the value of thequerySchemarecord component.- Returns:
- the value of the
querySchemarecord component
-
unifiedSchema
Returns the value of theunifiedSchemarecord component.- Returns:
- the value of the
unifiedSchemarecord component
-
maxRecordBytes
public int maxRecordBytes()Returns the value of themaxRecordBytesrecord component.- Returns:
- the value of the
maxRecordBytesrecord component
-
isCancelled
Returns the value of theisCancelledrecord component.- Returns:
- the value of the
isCancelledrecord component
-
declaredReadSpec
Returns the value of thedeclaredReadSpecrecord component.- Returns:
- the value of the
declaredReadSpecrecord component
-