pub enum ColumnOrder {
TYPE_DEFINED_ORDER(SortOrder),
IEEE_754_TOTAL_ORDER,
INT96_TIMESTAMP_ORDER,
UNDEFINED,
UNKNOWN,
}Expand description
Column order that specifies what method was used to aggregate min/max values for statistics.
Prior to version 2.4.0, Parquet used signed comparisons when computing min and max
values for statistics. This caused problems for UTF8 encoded strings, so the
ColumnOrder union was added, initially with a single variant TYPE_ORDER. The
sort order for columns was then defined based on the logical or physical type of
the column, and could use either signed comparison, unsigned comparison, or for some
types be left undefined. Since then several new ColumnOrders have been added to the
specification.
In this crate, the ColumnOrder found in the footer is represented by this enum. To
convey what actual sort order to use, this crate maps the ColumnOrder along with the
physical and logical type to a SortOrder. It is this SortOrder that is used
internally when deciding how to compute the min/max statistics.
If column order is undefined, then it is the legacy behaviour and all values should be compared as signed values/bytes.
Variants§
TYPE_DEFINED_ORDER(SortOrder)
Column uses the order defined by its logical or physical type (if there is no logical type), parquet-format 2.4.0+.
IEEE_754_TOTAL_ORDER
Column ordering to use for floating point types.
INT96_TIMESTAMP_ORDER
Column ordering to use for INT96 types.
UNDEFINED
Undefined column order, means legacy behaviour before parquet-format 2.4.0. Sort order is always SIGNED.
UNKNOWN
An unknown but present ColumnOrder. Statistics with an unknown ColumnOrder
will be ignored.
Implementations§
Source§impl ColumnOrder
impl ColumnOrder
Sourcepub fn column_order_for_type(
logical_type: Option<&LogicalType>,
converted_type: ConvertedType,
physical_type: Type,
) -> ColumnOrder
pub fn column_order_for_type( logical_type: Option<&LogicalType>, converted_type: ConvertedType, physical_type: Type, ) -> ColumnOrder
Returns the ColumnOrder for a physical/logical type.
Sourcepub fn sort_order_for_type(
logical_type: Option<&LogicalType>,
converted_type: ConvertedType,
physical_type: Type,
is_type_defined: bool,
) -> SortOrder
👎Deprecated since 60.0.0: use ColumnOrder::sort_order instead
pub fn sort_order_for_type( logical_type: Option<&LogicalType>, converted_type: ConvertedType, physical_type: Type, is_type_defined: bool, ) -> SortOrder
use ColumnOrder::sort_order instead
Returns sort order for a physical/logical type.
is_type_defined indicates whether the column order for this type is
ColumnOrder::TYPE_DEFINED_ORDER.
It is now preferred to obtain this via Self::sort_order.
pub(crate) fn get_sort_order_for_type( logical_type: Option<&LogicalType>, converted_type: ConvertedType, physical_type: Type, is_type_defined: bool, ) -> SortOrder
fn get_converted_sort_order( converted_type: ConvertedType, physical_type: Type, is_type_defined: bool, ) -> SortOrder
Sourcefn get_default_sort_order(
physical_type: Type,
is_type_defined: bool,
) -> SortOrder
fn get_default_sort_order( physical_type: Type, is_type_defined: bool, ) -> SortOrder
Returns default sort order based on physical type.
Sourcepub fn sort_order(&self) -> SortOrder
pub fn sort_order(&self) -> SortOrder
Returns sort order associated with this column order.
Trait Implementations§
Source§impl Clone for ColumnOrder
impl Clone for ColumnOrder
Source§fn clone(&self) -> ColumnOrder
fn clone(&self) -> ColumnOrder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ColumnOrder
Source§impl Debug for ColumnOrder
impl Debug for ColumnOrder
Source§impl Display for ColumnOrder
impl Display for ColumnOrder
impl Eq for ColumnOrder
Source§impl HeapSize for ColumnOrder
impl HeapSize for ColumnOrder
Source§impl PartialEq for ColumnOrder
impl PartialEq for ColumnOrder
Source§impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for ColumnOrder
impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for ColumnOrder
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 ColumnOrder
Source§impl WriteThrift for ColumnOrder
impl WriteThrift for ColumnOrder
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.Auto Trait Implementations§
impl Freeze for ColumnOrder
impl RefUnwindSafe for ColumnOrder
impl Send for ColumnOrder
impl Sync for ColumnOrder
impl Unpin for ColumnOrder
impl UnsafeUnpin for ColumnOrder
impl UnwindSafe for ColumnOrder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.