Package org.apache.parquet.format
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe set of fields this struct contains, along with convenience methods for finding and manipulating them. -
Field Summary
FieldsModifier and TypeFieldDescriptionintLength of the definition levelsEncoding used for data in this page *booleanWhether the values are compressed.static final Map<DataPageHeaderV2._Fields,org.apache.thrift.meta_data.FieldMetaData> intNumber of NULL values, in this data page.intNumber of rows in this data page.intNumber of values, including NULLs, in this data pageintLength of the repetition levelsOptional statistics for the data in this page * -
Constructor Summary
ConstructorsConstructorDescriptionDataPageHeaderV2(int num_values, int num_nulls, int num_rows, Encoding encoding, int definition_levels_byte_length, int repetition_levels_byte_length) DataPageHeaderV2(DataPageHeaderV2 other) Performs a deep copy on other. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()intcompareTo(DataPageHeaderV2 other) deepCopy()booleanbooleanequals(DataPageHeaderV2 that) fieldForId(int fieldId) intLength of the definition levelsEncoding used for data in this page *intNumber of NULL values, in this data page.intNumber of rows in this data page.intNumber of values, including NULLs, in this data pageintLength of the repetition levelsOptional statistics for the data in this page *inthashCode()booleanWhether the values are compressed.booleanisSet(DataPageHeaderV2._Fields field) Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwisebooleanReturns true if field definition_levels_byte_length is set (has been assigned a value) and false otherwisebooleanReturns true if field encoding is set (has been assigned a value) and false otherwisebooleanReturns true if field is_compressed is set (has been assigned a value) and false otherwisebooleanReturns true if field num_nulls is set (has been assigned a value) and false otherwisebooleanReturns true if field num_rows is set (has been assigned a value) and false otherwisebooleanReturns true if field num_values is set (has been assigned a value) and false otherwisebooleanReturns true if field repetition_levels_byte_length is set (has been assigned a value) and false otherwisebooleanReturns true if field statistics is set (has been assigned a value) and false otherwisevoidread(org.apache.thrift.protocol.TProtocol iprot) setDefinition_levels_byte_length(int definition_levels_byte_length) Length of the definition levelsvoidsetDefinition_levels_byte_lengthIsSet(boolean value) setEncoding(Encoding encoding) Encoding used for data in this page *voidsetEncodingIsSet(boolean value) voidsetFieldValue(DataPageHeaderV2._Fields field, Object value) setIs_compressed(boolean is_compressed) Whether the values are compressed.voidsetIs_compressedIsSet(boolean value) setNum_nulls(int num_nulls) Number of NULL values, in this data page.voidsetNum_nullsIsSet(boolean value) setNum_rows(int num_rows) Number of rows in this data page.voidsetNum_rowsIsSet(boolean value) setNum_values(int num_values) Number of values, including NULLs, in this data pagevoidsetNum_valuesIsSet(boolean value) setRepetition_levels_byte_length(int repetition_levels_byte_length) Length of the repetition levelsvoidsetRepetition_levels_byte_lengthIsSet(boolean value) setStatistics(Statistics statistics) Optional statistics for the data in this page *voidsetStatisticsIsSet(boolean value) toString()voidvoidvoidvoidvoidvoidvoidvoidvoidvalidate()voidwrite(org.apache.thrift.protocol.TProtocol oprot)
-
Field Details
-
num_values
public int num_valuesNumber of values, including NULLs, in this data page. * -
num_nulls
public int num_nullsNumber 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_rowsNumber 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
Encoding used for data in this page *- See Also:
-
definition_levels_byte_length
public int definition_levels_byte_lengthLength of the definition levels -
repetition_levels_byte_length
public int repetition_levels_byte_lengthLength of the repetition levels -
is_compressed
public boolean is_compressedWhether 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
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
Performs a deep copy on other.
-
-
Method Details
-
deepCopy
- Specified by:
deepCopyin interfaceorg.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
-
clear
public void clear()- Specified by:
clearin interfaceorg.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
-
getNum_values
public int getNum_values()Number of values, including NULLs, in this data page. * -
setNum_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
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
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
Encoding used for data in this page *- See Also:
-
setEncoding
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
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
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
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
Optional statistics for the data in this page * -
setStatistics
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
- Specified by:
setFieldValuein interfaceorg.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
-
getFieldValue
- Specified by:
getFieldValuein interfaceorg.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
-
isSet
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise- Specified by:
isSetin interfaceorg.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
-
equals
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<DataPageHeaderV2>
-
fieldForId
- Specified by:
fieldForIdin interfaceorg.apache.thrift.TBase<DataPageHeaderV2,DataPageHeaderV2._Fields>
-
read
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException - Specified by:
readin interfaceorg.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:
writein interfaceorg.apache.thrift.TSerializable- Throws:
org.apache.thrift.TException
-
toString
-
validate
public void validate() throws org.apache.thrift.TException- Throws:
org.apache.thrift.TException
-