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.
const fn max_discriminant_impl() -> i32
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 moreSource§impl Debug for ConvertedType
impl Debug for ConvertedType
Source§impl Display for ConvertedType
impl Display for ConvertedType
Source§impl From<Option<LogicalType>> for ConvertedType
impl From<Option<LogicalType>> for ConvertedType
Source§fn from(value: Option<LogicalType>) -> Self
fn from(value: Option<LogicalType>) -> Self
Source§impl FromStr for ConvertedType
impl FromStr for ConvertedType
Source§impl Hash for ConvertedType
impl Hash for ConvertedType
Source§impl Ord for ConvertedType
impl Ord for ConvertedType
Source§fn cmp(&self, other: &ConvertedType) -> Ordering
fn cmp(&self, other: &ConvertedType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ConvertedType
impl PartialEq for ConvertedType
Source§impl PartialOrd for ConvertedType
impl PartialOrd for ConvertedType
Source§impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for ConvertedType
impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for ConvertedType
Source§fn read_thrift(prot: &mut R) -> Result<Self>
fn read_thrift(prot: &mut R) -> Result<Self>
Self from the input protocol object.Source§impl WriteThrift for ConvertedType
impl WriteThrift for ConvertedType
Source§const ELEMENT_TYPE: ElementType = ElementType::I32
const ELEMENT_TYPE: ElementType = ElementType::I32
ElementType to use when a list of this object is written.Source§fn write_thrift<W: Write>(
&self,
writer: &mut ThriftCompactOutputProtocol<W>,
) -> Result<()>
fn write_thrift<W: Write>( &self, writer: &mut ThriftCompactOutputProtocol<W>, ) -> Result<()>
writer.Source§impl WriteThriftField for ConvertedType
impl WriteThriftField for ConvertedType
Source§fn write_thrift_field<W: Write>(
&self,
writer: &mut ThriftCompactOutputProtocol<W>,
field_id: i16,
last_field_id: i16,
) -> Result<i16>
fn write_thrift_field<W: Write>( &self, writer: &mut ThriftCompactOutputProtocol<W>, field_id: i16, last_field_id: i16, ) -> Result<i16>
field_id, using last_field_id to compute the
field delta used by the Thrift compact protocol. On success this will return field_id
to be used in chaining.impl Copy for ConvertedType
impl Eq for ConvertedType
impl StructuralPartialEq for ConvertedType
Auto Trait Implementations§
impl Freeze for ConvertedType
impl RefUnwindSafe for ConvertedType
impl Send for ConvertedType
impl Sync for ConvertedType
impl Unpin for ConvertedType
impl UnwindSafe for ConvertedType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more