Record Class SplitDiscoveryContext

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.spi.SplitDiscoveryContext
Record Components:
projectedDataColumns - names of data columns (excluding metadata attributes) that the query actually needs. When non-empty, split providers can skip files whose schema has zero overlap with this set (UNION_BY_NAME optimisation). Empty means either all columns are needed or the set is unknown.

public record SplitDiscoveryContext(SourceMetadata metadata, FileList fileList, Map<String,Object> config, PartitionMetadata partitionInfo, List<Expression> filterHints, Set<String> projectedDataColumns) 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

    • 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, Set<String> projectedDataColumns)
      Creates an instance of a SplitDiscoveryContext record class.
      Parameters:
      metadata - the value for the metadata record component
      fileList - the value for the fileList record component
      config - the value for the config record component
      partitionInfo - the value for the partitionInfo record component
      filterHints - the value for the filterHints record component
      projectedDataColumns - the value for the projectedDataColumns record component
  • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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
    • 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
    • projectedDataColumns

      public Set<String> projectedDataColumns()
      Returns the value of the projectedDataColumns record component.
      Returns:
      the value of the projectedDataColumns record component