Record Class Statistics
java.lang.Object
java.lang.Record
dev.hardwood.metadata.Statistics
- Record Components:
minValue- minimum value encoded as raw bytes (little-endian), ornullif absentmaxValue- maximum value encoded as raw bytes (little-endian), ornullif absentnullCount- number of null values in the column chunk, ornullif absentdistinctCount- number of distinct values in the column chunk, ornullif absentisMinMaxDeprecated- whether the bounds came from the deprecatedmin/maxfieldsisMinValueExact- whetherminValueis the exact minimum (not a truncated lower bound)isMaxValueExact- whethermaxValueis the exact maximum (not a truncated upper bound)nanCount- number of NaN values in the column chunk, ornullif absent. Only meaningful forFLOAT,DOUBLEandFLOAT16columns. NaN sits outside the ordering ofminValue/maxValue, so those bounds say nothing about how many NaN values a chunk holds
public record Statistics(byte[] minValue, byte[] maxValue, Long nullCount, Long distinctCount, boolean isMinMaxDeprecated, boolean isMinValueExact, boolean isMaxValueExact, Long nanCount)
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.
The min / max bounds may be truncated approximations for long BYTE_ARRAY values,
in which case isMinValueExact / isMaxValueExact is false and the stored bound only
brackets the true extreme (a truncated minValue is <= every value, a truncated
maxValue is >= every value). A fixed-width bound is always exact.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStatistics(byte[] minValue, byte[] maxValue, Long nullCount, Long distinctCount, boolean isMinMaxDeprecated) Statistics whose bounds are exact and whose NaN count was not recorded — the common case for every fixed-width type and any untruncated bound.Statistics(byte[] minValue, byte[] maxValue, Long nullCount, Long distinctCount, boolean isMinMaxDeprecated, boolean isMinValueExact, boolean isMaxValueExact, Long nanCount) Creates an instance of aStatisticsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedistinctCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisMaxValueExactrecord component.booleanReturns the value of theisMinMaxDeprecatedrecord component.booleanReturns the value of theisMinValueExactrecord component.byte[]maxValue()Returns the value of themaxValuerecord component.byte[]minValue()Returns the value of theminValuerecord component.nanCount()Returns the value of thenanCountrecord component.Returns the value of thenullCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Statistics
-
Statistics
public Statistics(byte[] minValue, byte[] maxValue, Long nullCount, Long distinctCount, boolean isMinMaxDeprecated, boolean isMinValueExact, boolean isMaxValueExact, Long nanCount) Creates an instance of aStatisticsrecord class.- Parameters:
minValue- the value for theminValuerecord componentmaxValue- the value for themaxValuerecord componentnullCount- the value for thenullCountrecord componentdistinctCount- the value for thedistinctCountrecord componentisMinMaxDeprecated- the value for theisMinMaxDeprecatedrecord componentisMinValueExact- the value for theisMinValueExactrecord componentisMaxValueExact- the value for theisMaxValueExactrecord componentnanCount- the value for thenanCountrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
minValue
-
maxValue
-
nullCount
-
distinctCount
Returns the value of thedistinctCountrecord component.- Returns:
- the value of the
distinctCountrecord component
-
isMinMaxDeprecated
public boolean isMinMaxDeprecated()Returns the value of theisMinMaxDeprecatedrecord component.- Returns:
- the value of the
isMinMaxDeprecatedrecord component
-
isMinValueExact
public boolean isMinValueExact()Returns the value of theisMinValueExactrecord component.- Returns:
- the value of the
isMinValueExactrecord component
-
isMaxValueExact
public boolean isMaxValueExact()Returns the value of theisMaxValueExactrecord component.- Returns:
- the value of the
isMaxValueExactrecord component
-
nanCount
-