Record Class Statistics

java.lang.Object
java.lang.Record
dev.hardwood.metadata.Statistics
Record Components:
minValue - minimum value encoded as raw bytes (little-endian), or null if absent
maxValue - maximum value encoded as raw bytes (little-endian), or null if absent
nullCount - number of null values in the column chunk, or null if absent
distinctCount - number of distinct values in the column chunk, or null if absent

public record Statistics(byte[] minValue, byte[] maxValue, Long nullCount, Long distinctCount, boolean isMinMaxDeprecated) extends Record

Column chunk statistics for min/max values, null count, and distinct count.

Used for predicate push-down: row groups whose statistics prove that no rows can match a filter predicate are skipped entirely.

See Also:
  • Constructor Details

    • Statistics

      public Statistics(byte[] minValue, byte[] maxValue, Long nullCount, Long distinctCount, boolean isMinMaxDeprecated)
      Creates an instance of a Statistics record class.
      Parameters:
      minValue - the value for the minValue record component
      maxValue - the value for the maxValue record component
      nullCount - the value for the nullCount record component
      distinctCount - the value for the distinctCount record component
      isMinMaxDeprecated - the value for the isMinMaxDeprecated 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 the compare method from their corresponding wrapper classes.
      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.
    • minValue

      public byte[] minValue()
      Returns the value of the minValue record component.
      Returns:
      the value of the minValue record component
    • maxValue

      public byte[] maxValue()
      Returns the value of the maxValue record component.
      Returns:
      the value of the maxValue record component
    • nullCount

      public Long nullCount()
      Returns the value of the nullCount record component.
      Returns:
      the value of the nullCount record component
    • distinctCount

      public Long distinctCount()
      Returns the value of the distinctCount record component.
      Returns:
      the value of the distinctCount record component
    • isMinMaxDeprecated

      public boolean isMinMaxDeprecated()
      Returns the value of the isMinMaxDeprecated record component.
      Returns:
      the value of the isMinMaxDeprecated record component