pub enum ConvertedType {
Show 23 variants
NONE = -1,
UTF8 = 0,
MAP = 1,
MAP_KEY_VALUE = 2,
LIST = 3,
ENUM = 4,
DECIMAL = 5,
DATE = 6,
TIME_MILLIS = 7,
TIME_MICROS = 8,
TIMESTAMP_MILLIS = 9,
TIMESTAMP_MICROS = 10,
UINT_8 = 11,
UINT_16 = 12,
UINT_32 = 13,
UINT_64 = 14,
INT_8 = 15,
INT_16 = 16,
INT_32 = 17,
INT_64 = 18,
JSON = 19,
BSON = 20,
INTERVAL = 21,
}Expand description
Common types (converted types) used by frameworks when using Parquet.
This helps map between types in those frameworks to the base types in Parquet. This is only metadata and not needed to read or write the data.
This struct was renamed from LogicalType in version 4.0.0.
If targeting Parquet format 2.4.0 or above, please use LogicalType instead.
Variants§
NONE = -1
Not defined in the spec, used internally to indicate no type conversion
UTF8 = 0
A BYTE_ARRAY actually contains UTF8 encoded chars.
MAP = 1
A map is converted as an optional field containing a repeated key/value pair.
MAP_KEY_VALUE = 2
A key/value pair is converted into a group of two fields.
LIST = 3
A list is converted into an optional field containing a repeated field for its values.
ENUM = 4
An enum is converted into a BYTE_ARRAY field
DECIMAL = 5
A decimal value.
This may be used to annotate BYTE_ARRAY or FIXED_LEN_BYTE_ARRAY primitive types. The underlying byte array stores the unscaled value encoded as two’s complement using big-endian byte order (the most significant byte is the zeroth element). The value of the decimal is the value * 10^{-scale}.
This must be accompanied by a (maximum) precision and a scale in the SchemaElement. The precision specifies the number of digits in the decimal and the scale stores the location of the decimal point. For example 1.23 would have precision 3 (3 total digits) and scale 2 (the decimal point is 2 digits over).
DATE = 6
A date stored as days since Unix epoch, encoded as the INT32 physical type.
TIME_MILLIS = 7
The total number of milliseconds since midnight. The value is stored as an INT32 physical type.
TIME_MICROS = 8
The total number of microseconds since midnight. The value is stored as an INT64 physical type.
TIMESTAMP_MILLIS = 9
Date and time recorded as milliseconds since the Unix epoch. Recorded as a physical type of INT64.
TIMESTAMP_MICROS = 10
Date and time recorded as microseconds since the Unix epoch. The value is stored as an INT64 physical type.
UINT_8 = 11
An unsigned 8 bit integer value stored as INT32 physical type.
UINT_16 = 12
An unsigned 16 bit integer value stored as INT32 physical type.
UINT_32 = 13
An unsigned 32 bit integer value stored as INT32 physical type.
UINT_64 = 14
An unsigned 64 bit integer value stored as INT64 physical type.
INT_8 = 15
A signed 8 bit integer value stored as INT32 physical type.
INT_16 = 16
A signed 16 bit integer value stored as INT32 physical type.
INT_32 = 17
A signed 32 bit integer value stored as INT32 physical type.
INT_64 = 18
A signed 64 bit integer value stored as INT64 physical type.
JSON = 19
A JSON document embedded within a single UTF8 column.
BSON = 20
A BSON document embedded within a single BINARY column.
INTERVAL = 21
An interval of time
This type annotates data stored as a FIXED_LEN_BYTE_ARRAY of length 12. This data is composed of three separate little endian unsigned integers. Each stores a component of a duration of time. The first integer identifies the number of months associated with the duration, the second identifies the number of days associated with the duration and the third identifies the number of milliseconds associated with the provided duration. This duration of time is independent of any particular timezone or date.
Implementations§
Source§impl ConvertedType
impl ConvertedType
Sourcepub const MAX_DISCRIMINANT: i32 = 21i32
pub const MAX_DISCRIMINANT: i32 = 21i32
Returns the largest discriminant value defined for this enum.
Trait Implementations§
Source§impl Clone for ConvertedType
impl Clone for ConvertedType
Source§fn clone(&self) -> ConvertedType
fn clone(&self) -> ConvertedType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more