Record Class SizeStatistics

java.lang.Object
java.lang.Record
dev.hardwood.metadata.SizeStatistics
Record Components:
unencodedByteArrayDataBytes - total unencoded size of the BYTE_ARRAY data in this chunk, or null if absent
repetitionLevelHistogram - number of values at each repetition level 0..maxRepetitionLevel, or null if absent
definitionLevelHistogram - number of values at each definition level 0..maxDefinitionLevel, or null if absent

public record SizeStatistics(Long unencodedByteArrayDataBytes, long[] repetitionLevelHistogram, long[] definitionLevelHistogram) extends Record

Size statistics for a column chunk: the unencoded size of its BYTE_ARRAY data and its repetition- and definition-level histograms.

A level histogram is indexed by level — entry i holds the number of values at level i, so the histogram has maxLevel + 1 entries. It yields the null and empty-list counts of a chunk without decoding its level streams.

Every field is optional in the Parquet format. A writer that omits one is reported as null, which is distinct from a present but empty histogram. The histograms are the values as the file recorded them and are not copied on the way in or out.

See Also:
  • Constructor Details

    • SizeStatistics

      public SizeStatistics(Long unencodedByteArrayDataBytes, long[] repetitionLevelHistogram, long[] definitionLevelHistogram)
      Creates an instance of a SizeStatistics record class.
      Parameters:
      unencodedByteArrayDataBytes - the value for the unencodedByteArrayDataBytes record component
      repetitionLevelHistogram - the value for the repetitionLevelHistogram record component
      definitionLevelHistogram - the value for the definitionLevelHistogram 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • unencodedByteArrayDataBytes

      public Long unencodedByteArrayDataBytes()
      Returns the value of the unencodedByteArrayDataBytes record component.
      Returns:
      the value of the unencodedByteArrayDataBytes record component
    • repetitionLevelHistogram

      public long[] repetitionLevelHistogram()
      Returns the value of the repetitionLevelHistogram record component.
      Returns:
      the value of the repetitionLevelHistogram record component
    • definitionLevelHistogram

      public long[] definitionLevelHistogram()
      Returns the value of the definitionLevelHistogram record component.
      Returns:
      the value of the definitionLevelHistogram record component