Package org.apache.parquet.format
Enum Encoding
- java.lang.Object
-
- java.lang.Enum<Encoding>
-
- org.apache.parquet.format.Encoding
-
- All Implemented Interfaces:
Serializable
,Comparable<Encoding>
,org.apache.thrift.TEnum
@Generated(value="Autogenerated by Thrift Compiler (0.13.0)", date="2021-03-17") 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 Constants Enum Constant Description BIT_PACKED
Bit packed encoding.BYTE_STREAM_SPLIT
Encoding for floating-point data.DELTA_BINARY_PACKED
Delta encoding for integers.DELTA_BYTE_ARRAY
Incremental-encoded byte array.DELTA_LENGTH_BYTE_ARRAY
Encoding for byte arrays to separate the length values and the data.PLAIN
Default encoding.PLAIN_DICTIONARY
Deprecated: Dictionary encoding.RLE
Group packed run length encoding.RLE_DICTIONARY
Dictionary encoding: the ids are encoded using the RLE encoding
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Encoding
findByValue(int value)
Find a the enum type by its integer value, as defined in the Thrift IDL.int
getValue()
Get the integer value of this enum value, as defined in the Thrift IDL.static Encoding
valueOf(String name)
Returns 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 Detail
-
PLAIN
public static final Encoding 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
public static final Encoding PLAIN_DICTIONARY
Deprecated: Dictionary encoding. The values in the dictionary are encoded in the plain type. in a data page use RLE_DICTIONARY instead. in a Dictionary page use PLAIN instead
-
RLE
public static final Encoding 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
public static final Encoding BIT_PACKED
Bit packed encoding. This can only be used if the data has a known max width. Usable for definition/repetition levels encoding.
-
DELTA_BINARY_PACKED
public static final Encoding DELTA_BINARY_PACKED
Delta encoding for integers. This can be used for int columns and works best on sorted data
-
DELTA_LENGTH_BYTE_ARRAY
public static final Encoding 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
public static final Encoding 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
public static final Encoding RLE_DICTIONARY
Dictionary encoding: the ids are encoded using the RLE encoding
-
BYTE_STREAM_SPLIT
public static final Encoding BYTE_STREAM_SPLIT
Encoding for floating-point data. K byte-streams are created where K is the size in bytes of the data type. The individual bytes of an FP 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.
-
-
Method Detail
-
values
public static Encoding[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Encoding c : Encoding.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Encoding valueOf(String name)
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:
getValue
in interfaceorg.apache.thrift.TEnum
-
findByValue
public static Encoding findByValue(int value)
Find a the enum type by its integer value, as defined in the Thrift IDL.- Returns:
- null if the value is not found.
-
-