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 equalsrows - nullCount, but for a multivalued column it counts every value (e.g. an NDJSON array[a,b,c]contributes 3). This is whatCOUNT(col)returns (Count: "COUNTing a multivalued field returns the number of values"), so it is served directly rather than derived fromrows - 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
ConstructorsConstructorDescriptionColumnStats(long nullCount, long valueCount, Object min, Object max) Creates an instance of aColumnStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.max()Returns the value of themaxrecord component.min()Returns the value of theminrecord component.longReturns the value of thenullCountrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thevalueCountrecord component.
-
Constructor Details
-
ColumnStats
Creates an instance of aColumnStatsrecord class.- Parameters:
nullCount- the value for thenullCountrecord componentvalueCount- the value for thevalueCountrecord componentmin- the value for theminrecord componentmax- the value for themaxrecord 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 '=='. -
nullCount
public long nullCount()Returns the value of thenullCountrecord component.- Returns:
- the value of the
nullCountrecord component
-
valueCount
public long valueCount()Returns the value of thevalueCountrecord component.- Returns:
- the value of the
valueCountrecord component
-
min
Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-