Package org.apache.parquet.format
Enum Encoding
- All Implemented Interfaces:
Serializable,Comparable<Encoding>,org.apache.thrift.TEnum
@Generated(value="Autogenerated by Thrift Compiler (0.23.0)",
date="2026-08-06")
public enum Encoding
extends Enum<Encoding>
implements org.apache.thrift.TEnum
Encodings supported by Parquet. Not all encodings are valid for all types. These
enums are also used to specify the encoding of definition and repetition levels.
See the accompanying doc for the details of the more complicated encodings.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDEPRECATED: Bit packed encoding.Encoding for fixed-width data (FLOAT, DOUBLE, INT32, INT64, FIXED_LEN_BYTE_ARRAY).Delta encoding for integers.Incremental-encoded byte array.Encoding for byte arrays to separate the length values and the data.Default encoding.DEPRECATED: Dictionary encoding.Group packed run length encoding.Dictionary encoding: the ids are encoded using the RLE encoding -
Method Summary
Modifier and TypeMethodDescriptionstatic EncodingfindByValue(int value) Find a the enum type by its integer value, as defined in the Thrift IDL.intgetValue()Get the integer value of this enum value, as defined in the Thrift IDL.static EncodingReturns the enum constant of this type with the specified name.static Encoding[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PLAIN
Default encoding. BOOLEAN - 1 bit per value. 0 is false; 1 is true. INT32 - 4 bytes per value. Stored as little-endian. INT64 - 8 bytes per value. Stored as little-endian. FLOAT - 4 bytes per value. IEEE. Stored as little-endian. DOUBLE - 8 bytes per value. IEEE. Stored as little-endian. BYTE_ARRAY - 4 byte length stored as little endian, followed by bytes. FIXED_LEN_BYTE_ARRAY - Just the bytes. -
PLAIN_DICTIONARY
DEPRECATED: Dictionary encoding. The values in the dictionary are encoded in the plain type. For a data page use RLE_DICTIONARY instead. For a Dictionary page use PLAIN instead. -
RLE
Group packed run length encoding. Usable for definition/repetition levels encoding and Booleans (on one bit: 0 is false; 1 is true.) -
BIT_PACKED
DEPRECATED: Bit packed encoding. This can only be used if the data has a known max width. Usable for definition/repetition levels encoding. Superseded by RLE (which is a hybrid of RLE and bit packing); see Encodings.md. -
DELTA_BINARY_PACKED
Delta encoding for integers. This can be used for int columns and works best on sorted data -
DELTA_LENGTH_BYTE_ARRAY
Encoding for byte arrays to separate the length values and the data. The lengths are encoded using DELTA_BINARY_PACKED -
DELTA_BYTE_ARRAY
Incremental-encoded byte array. Prefix lengths are encoded using DELTA_BINARY_PACKED. Suffixes are stored as delta length byte arrays. -
RLE_DICTIONARY
Dictionary encoding: the ids are encoded using the RLE encoding -
BYTE_STREAM_SPLIT
Encoding for fixed-width data (FLOAT, DOUBLE, INT32, INT64, FIXED_LEN_BYTE_ARRAY). K byte-streams are created where K is the size in bytes of the data type. The individual bytes of a value are scattered to the corresponding stream and the streams are concatenated. This itself does not reduce the size of the data but can lead to better compression afterwards. Added in 2.8 for FLOAT and DOUBLE. Support for INT32, INT64 and FIXED_LEN_BYTE_ARRAY added in 2.11.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public int getValue()Get the integer value of this enum value, as defined in the Thrift IDL.- Specified by:
getValuein interfaceorg.apache.thrift.TEnum
-
findByValue
Find a the enum type by its integer value, as defined in the Thrift IDL.- Returns:
- null if the value is not found.
-