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 use ExternalSchema.names() for membership tests when pruning per-file mappings or skipping files with no column overlap.
unifiedSchema - the pre-prune Unified schema, or null when not available. Together with querySchema and each file's schema this lets split providers narrow per-file ColumnMappings 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 a CancellableTask.

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 Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • metadata

      public SourceMetadata metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component
    • fileList

      public FileList fileList()
      Returns the value of the fileList record component.
      Returns:
      the value of the fileList record component
    • schemaMap

      Returns the value of the schemaMap record component.
      Returns:
      the value of the schemaMap record component
    • config

      public Map<String,Object> config()
      Returns the value of the config record component.
      Returns:
      the value of the config record component
    • partitionInfo

      public PartitionMetadata partitionInfo()
      Returns the value of the partitionInfo record component.
      Returns:
      the value of the partitionInfo record component
    • filterHints

      public List<Expression> filterHints()
      Returns the value of the filterHints record component.
      Returns:
      the value of the filterHints record component
    • querySchema

      public ExternalSchema querySchema()
      Returns the value of the querySchema record component.
      Returns:
      the value of the querySchema record component
    • unifiedSchema

      @Nullable public ExternalSchema unifiedSchema()
      Returns the value of the unifiedSchema record component.
      Returns:
      the value of the unifiedSchema record component
    • maxRecordBytes

      public int maxRecordBytes()
      Returns the value of the maxRecordBytes record component.
      Returns:
      the value of the maxRecordBytes record component
    • isCancelled

      public BooleanSupplier isCancelled()
      Returns the value of the isCancelled record component.
      Returns:
      the value of the isCancelled record component
    • declaredReadSpec

      public DeclaredReadSpec declaredReadSpec()
      Returns the value of the declaredReadSpec record component.
      Returns:
      the value of the declaredReadSpec record component