Record Class ExternalStats.Stats

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.cache.ExternalStats.Stats
Record Components:
rowCount - total rows in the file (always populated; the capture gate refuses to write a partial count)
bytesRead - bytes consumed from the input stream; present only for stream-only sources where StorageObject.length() is unknown, so the value is captured during scan
columns - per-column stats keyed by column name; empty when no columns were materialized during the cold scan (e.g. STATS COUNT(*) with no projection)
Enclosing class:
ExternalStats

public static record ExternalStats.Stats(long rowCount, OptionalLong bytesRead, Map<String,ExternalStats.ColumnStats> columns) extends Record
Structured per-file statistics captured during a clean whole-file (or summed-chunk) cold scan.
  • 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.
    • rowCount

      public long rowCount()
      Returns the value of the rowCount record component.
      Returns:
      the value of the rowCount record component
    • bytesRead

      public OptionalLong bytesRead()
      Returns the value of the bytesRead record component.
      Returns:
      the value of the bytesRead record component
    • columns

      Returns the value of the columns record component.
      Returns:
      the value of the columns record component