Class DataPageHeaderV2

java.lang.Object
org.apache.parquet.format.DataPageHeaderV2
All Implemented Interfaces:
Serializable, Cloneable, Comparable<DataPageHeaderV2>, org.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>, org.apache.thrift.TSerializable

@Generated(value="Autogenerated by Thrift Compiler (0.23.0)", date="2026-08-06") public class DataPageHeaderV2 extends Object implements org.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>, Serializable, Cloneable, Comparable<DataPageHeaderV2>
Alternate page format allowing reading levels without decompressing the data Repetition and definition levels are uncompressed The remaining section containing the data is compressed if is_compressed is true Implementation note - this header is not necessarily a strict improvement over `DataPageHeader` (in particular the original header might provide better compression in some scenarios). Page indexes require pages to start and end at row boundaries, regardless of which page header is used.
See Also:
  • Field Details

    • num_values

      public int num_values
      Number of values, including NULLs, in this data page. *
    • num_nulls

      public int num_nulls
      Number of NULL values, in this data page. Number of non-null = num_values - num_nulls which is also the number of values in the data section *
    • num_rows

      public int num_rows
      Number of rows in this data page. Every page must begin at a row boundary (repetition_level = 0): rows must **not** be split across page boundaries when using V2 data pages.
    • encoding

      public Encoding encoding
      Encoding used for data in this page *
      See Also:
    • definition_levels_byte_length

      public int definition_levels_byte_length
      Length of the definition levels
    • repetition_levels_byte_length

      public int repetition_levels_byte_length
      Length of the repetition levels
    • is_compressed

      public boolean is_compressed
      Whether the values are compressed. Which means the section of the page between definition_levels_byte_length + repetition_levels_byte_length and compressed_page_size (included) is compressed with the compression_codec. If missing it is considered compressed
    • statistics

      public Statistics statistics
      Optional statistics for the data in this page *
    • metaDataMap

      public static final Map<DataPageHeaderV2._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
  • Constructor Details

    • DataPageHeaderV2

      public DataPageHeaderV2()
    • DataPageHeaderV2

      public DataPageHeaderV2(int num_values, int num_nulls, int num_rows, Encoding encoding, int definition_levels_byte_length, int repetition_levels_byte_length)
    • DataPageHeaderV2

      public DataPageHeaderV2(DataPageHeaderV2 other)
      Performs a deep copy on other.
  • Method Details

    • deepCopy

      public DataPageHeaderV2 deepCopy()
      Specified by:
      deepCopy in interface org.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
    • clear

      public void clear()
      Specified by:
      clear in interface org.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
    • getNum_values

      public int getNum_values()
      Number of values, including NULLs, in this data page. *
    • setNum_values

      public DataPageHeaderV2 setNum_values(int num_values)
      Number of values, including NULLs, in this data page. *
    • unsetNum_values

      public void unsetNum_values()
    • isSetNum_values

      public boolean isSetNum_values()
      Returns true if field num_values is set (has been assigned a value) and false otherwise
    • setNum_valuesIsSet

      public void setNum_valuesIsSet(boolean value)
    • getNum_nulls

      public int getNum_nulls()
      Number of NULL values, in this data page. Number of non-null = num_values - num_nulls which is also the number of values in the data section *
    • setNum_nulls

      public DataPageHeaderV2 setNum_nulls(int num_nulls)
      Number of NULL values, in this data page. Number of non-null = num_values - num_nulls which is also the number of values in the data section *
    • unsetNum_nulls

      public void unsetNum_nulls()
    • isSetNum_nulls

      public boolean isSetNum_nulls()
      Returns true if field num_nulls is set (has been assigned a value) and false otherwise
    • setNum_nullsIsSet

      public void setNum_nullsIsSet(boolean value)
    • getNum_rows

      public int getNum_rows()
      Number of rows in this data page. Every page must begin at a row boundary (repetition_level = 0): rows must **not** be split across page boundaries when using V2 data pages.
    • setNum_rows

      public DataPageHeaderV2 setNum_rows(int num_rows)
      Number of rows in this data page. Every page must begin at a row boundary (repetition_level = 0): rows must **not** be split across page boundaries when using V2 data pages.
    • unsetNum_rows

      public void unsetNum_rows()
    • isSetNum_rows

      public boolean isSetNum_rows()
      Returns true if field num_rows is set (has been assigned a value) and false otherwise
    • setNum_rowsIsSet

      public void setNum_rowsIsSet(boolean value)
    • getEncoding

      public Encoding getEncoding()
      Encoding used for data in this page *
      See Also:
    • setEncoding

      public DataPageHeaderV2 setEncoding(Encoding encoding)
      Encoding used for data in this page *
      See Also:
    • unsetEncoding

      public void unsetEncoding()
    • isSetEncoding

      public boolean isSetEncoding()
      Returns true if field encoding is set (has been assigned a value) and false otherwise
    • setEncodingIsSet

      public void setEncodingIsSet(boolean value)
    • getDefinition_levels_byte_length

      public int getDefinition_levels_byte_length()
      Length of the definition levels
    • setDefinition_levels_byte_length

      public DataPageHeaderV2 setDefinition_levels_byte_length(int definition_levels_byte_length)
      Length of the definition levels
    • unsetDefinition_levels_byte_length

      public void unsetDefinition_levels_byte_length()
    • isSetDefinition_levels_byte_length

      public boolean isSetDefinition_levels_byte_length()
      Returns true if field definition_levels_byte_length is set (has been assigned a value) and false otherwise
    • setDefinition_levels_byte_lengthIsSet

      public void setDefinition_levels_byte_lengthIsSet(boolean value)
    • getRepetition_levels_byte_length

      public int getRepetition_levels_byte_length()
      Length of the repetition levels
    • setRepetition_levels_byte_length

      public DataPageHeaderV2 setRepetition_levels_byte_length(int repetition_levels_byte_length)
      Length of the repetition levels
    • unsetRepetition_levels_byte_length

      public void unsetRepetition_levels_byte_length()
    • isSetRepetition_levels_byte_length

      public boolean isSetRepetition_levels_byte_length()
      Returns true if field repetition_levels_byte_length is set (has been assigned a value) and false otherwise
    • setRepetition_levels_byte_lengthIsSet

      public void setRepetition_levels_byte_lengthIsSet(boolean value)
    • isIs_compressed

      public boolean isIs_compressed()
      Whether the values are compressed. Which means the section of the page between definition_levels_byte_length + repetition_levels_byte_length and compressed_page_size (included) is compressed with the compression_codec. If missing it is considered compressed
    • setIs_compressed

      public DataPageHeaderV2 setIs_compressed(boolean is_compressed)
      Whether the values are compressed. Which means the section of the page between definition_levels_byte_length + repetition_levels_byte_length and compressed_page_size (included) is compressed with the compression_codec. If missing it is considered compressed
    • unsetIs_compressed

      public void unsetIs_compressed()
    • isSetIs_compressed

      public boolean isSetIs_compressed()
      Returns true if field is_compressed is set (has been assigned a value) and false otherwise
    • setIs_compressedIsSet

      public void setIs_compressedIsSet(boolean value)
    • getStatistics

      public Statistics getStatistics()
      Optional statistics for the data in this page *
    • setStatistics

      public DataPageHeaderV2 setStatistics(Statistics statistics)
      Optional statistics for the data in this page *
    • unsetStatistics

      public void unsetStatistics()
    • isSetStatistics

      public boolean isSetStatistics()
      Returns true if field statistics is set (has been assigned a value) and false otherwise
    • setStatisticsIsSet

      public void setStatisticsIsSet(boolean value)
    • setFieldValue

      public void setFieldValue(DataPageHeaderV2._Fields field, Object value)
      Specified by:
      setFieldValue in interface org.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
    • getFieldValue

      public Object getFieldValue(DataPageHeaderV2._Fields field)
      Specified by:
      getFieldValue in interface org.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
    • isSet

      public boolean isSet(DataPageHeaderV2._Fields field)
      Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
      Specified by:
      isSet in interface org.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(DataPageHeaderV2 that)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(DataPageHeaderV2 other)
      Specified by:
      compareTo in interface Comparable<DataPageHeaderV2>
    • fieldForId

      public DataPageHeaderV2._Fields fieldForId(int fieldId)
      Specified by:
      fieldForId in interface org.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
    • read

      public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
      Specified by:
      read in interface org.apache.thrift.TSerializable
      Throws:
      org.apache.thrift.TException
    • write

      public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
      Specified by:
      write in interface org.apache.thrift.TSerializable
      Throws:
      org.apache.thrift.TException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validate

      public void validate() throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException