Record Class ExternalStats.ColumnStats

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.cache.ExternalStats.ColumnStats
Record Components:
nullCount - number of null cells (one per null row position; an empty multivalue is a null)
valueCount - number of non-null VALUES — for a single-valued column this equals rows - nullCount, but for a multivalued column it counts every value (e.g. an NDJSON array [a,b,c] contributes 3). This is what COUNT(col) returns (Count: "COUNTing a multivalued field returns the number of values"), so it is served directly rather than derived from rows - nullCount, which would under-count multivalued columns.
Enclosing class:
ExternalStats

public static record ExternalStats.ColumnStats(long nullCount, long valueCount, Object min, Object max) extends Record
Per-column statistics. Null min / max means the column is untracked at this layer (e.g. type without an ordered comparator at the capture site, or all rows were null).
  • Constructor Summary

    Constructors
    Constructor
    Description
    ColumnStats(long nullCount, long valueCount, Object min, Object max)
    Creates an instance of a ColumnStats record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    max()
    Returns the value of the max record component.
    min()
    Returns the value of the min record component.
    long
    Returns the value of the nullCount record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the valueCount record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ColumnStats

      public ColumnStats(long nullCount, long valueCount, Object min, Object max)
      Creates an instance of a ColumnStats record class.
      Parameters:
      nullCount - the value for the nullCount record component
      valueCount - the value for the valueCount record component
      min - the value for the min record component
      max - the value for the max 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. 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.
    • nullCount

      public long nullCount()
      Returns the value of the nullCount record component.
      Returns:
      the value of the nullCount record component
    • valueCount

      public long valueCount()
      Returns the value of the valueCount record component.
      Returns:
      the value of the valueCount record component
    • min

      public Object min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • max

      public Object max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component