pub enum LogicalType {
Show 18 variants
String,
Map,
List,
Enum,
Decimal(DecimalType),
Date,
Time(TimeType),
Timestamp(TimestampType),
Integer(IntType),
Unknown,
Json,
Bson,
Uuid,
Float16,
Variant(VariantType),
Geometry(GeometryType),
Geography(GeographyType),
_Unknown {
field_id: i16,
},
}Expand description
Logical types used by version 2.4.0+ of the Parquet format.
This is an entirely new struct as of version
4.0.0. The struct previously named LogicalType was renamed to
ConvertedType. Please see the README.md for more details.
Variants§
String
A UTF8 encoded string.
Map
A map of key-value pairs.
List
A list of elements.
Enum
A set of predefined values.
Decimal(DecimalType)
A decimal value with a specified scale and precision.
Date
A date stored as days since Unix epoch.
Time(TimeType)
A time stored as TimeUnit since midnight.
Timestamp(TimestampType)
A timestamp stored as TimeUnit since Unix epoch.
Integer(IntType)
An integer with a specified bit width and signedness.
Unknown
An unknown logical type.
Json
A JSON document.
Bson
A BSON document.
Uuid
A UUID.
Float16
A 16-bit floating point number.
Variant(VariantType)
A Variant value.
Geometry(GeometryType)
A geospatial feature in the Well-Known Binary (WKB) format with linear/planar edges interpolation.
Geography(GeographyType)
A geospatial feature in the WKB format with an explicit (non-linear/non-planar) edges interpolation.
_Unknown
Implementations§
Source§impl LogicalType
impl LogicalType
Sourcepub fn integer(bit_width: i8, is_signed: bool) -> Self
pub fn integer(bit_width: i8, is_signed: bool) -> Self
Create a LogicalType::Integer variant with the given bit_width and is_signed
Sourcepub fn decimal(scale: i32, precision: i32) -> Self
pub fn decimal(scale: i32, precision: i32) -> Self
Create a LogicalType::Decimal variant with the given scale and precision
Sourcepub fn time(is_adjusted_to_u_t_c: bool, unit: TimeUnit) -> Self
pub fn time(is_adjusted_to_u_t_c: bool, unit: TimeUnit) -> Self
Create a LogicalType::Time variant with the given is_adjusted_to_u_t_c and unit
Sourcepub fn timestamp(is_adjusted_to_u_t_c: bool, unit: TimeUnit) -> Self
pub fn timestamp(is_adjusted_to_u_t_c: bool, unit: TimeUnit) -> Self
Create a LogicalType::Timestamp variant with the given is_adjusted_to_u_t_c and unit
Sourcepub fn variant(specification_version: Option<i8>) -> Self
pub fn variant(specification_version: Option<i8>) -> Self
Create a LogicalType::Variant variant with the given specification_version
Sourcepub fn geometry(crs: Option<String>) -> Self
pub fn geometry(crs: Option<String>) -> Self
Create a LogicalType::Geometry variant with the given crs
Sourcepub fn geography(
crs: Option<String>,
algorithm: Option<EdgeInterpolationAlgorithm>,
) -> Self
pub fn geography( crs: Option<String>, algorithm: Option<EdgeInterpolationAlgorithm>, ) -> Self
Create a LogicalType::Geography variant with the given crs and algorithm
Trait Implementations§
Source§impl Clone for LogicalType
impl Clone for LogicalType
Source§fn clone(&self) -> LogicalType
fn clone(&self) -> LogicalType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LogicalType
impl Debug for LogicalType
impl Eq for LogicalType
Source§impl FromStr for LogicalType
impl FromStr for LogicalType
Source§impl PartialEq for LogicalType
impl PartialEq for LogicalType
Source§fn eq(&self, other: &LogicalType) -> bool
fn eq(&self, other: &LogicalType) -> bool
self and other values to be equal, and is used by ==.Source§impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for LogicalType
impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for LogicalType
Source§fn read_thrift(prot: &mut R) -> Result<Self>
fn read_thrift(prot: &mut R) -> Result<Self>
Self from the input protocol object.impl StructuralPartialEq for LogicalType
Source§impl WriteThrift for LogicalType
impl WriteThrift for LogicalType
Source§const ELEMENT_TYPE: ElementType = ElementType::Struct
const ELEMENT_TYPE: ElementType = ElementType::Struct
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 LogicalType
impl WriteThriftField for LogicalType
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.Auto Trait Implementations§
impl Freeze for LogicalType
impl RefUnwindSafe for LogicalType
impl Send for LogicalType
impl Sync for LogicalType
impl Unpin for LogicalType
impl UnsafeUnpin for LogicalType
impl UnwindSafe for LogicalType
Blanket Implementations§
impl<T> Allocation for T
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> 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.