Skip to main content

ColumnOrder

Enum ColumnOrder 

Source
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

Source

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.

Source

pub 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

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.

Source

pub(crate) fn get_sort_order_for_type( logical_type: Option<&LogicalType>, converted_type: ConvertedType, physical_type: Type, is_type_defined: bool, ) -> SortOrder

Source

fn get_converted_sort_order( converted_type: ConvertedType, physical_type: Type, is_type_defined: bool, ) -> SortOrder

Source

fn get_default_sort_order( physical_type: Type, is_type_defined: bool, ) -> SortOrder

Returns default sort order based on physical type.

Source

pub fn sort_order(&self) -> SortOrder

Returns sort order associated with this column order.

Trait Implementations§

Source§

impl Clone for ColumnOrder

Source§

fn clone(&self) -> ColumnOrder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ColumnOrder

Source§

impl Debug for ColumnOrder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ColumnOrder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ColumnOrder

Source§

impl HeapSize for ColumnOrder

Source§

fn heap_size(&self) -> usize

Return the size of any bytes allocated on the heap by this object, including heap memory in those structures Read more
Source§

impl PartialEq for ColumnOrder

Source§

fn eq(&self, other: &ColumnOrder) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a, R> for ColumnOrder

Source§

fn read_thrift(prot: &mut R) -> Result<Self>

Read an object of type Self from the input protocol object.
Source§

impl StructuralPartialEq for ColumnOrder

Source§

impl WriteThrift for ColumnOrder

Source§

const ELEMENT_TYPE: ElementType = ElementType::Struct

The ElementType to use when a list of this object is written.
Source§

fn write_thrift<W: Write>( &self, writer: &mut ThriftCompactOutputProtocol<W>, ) -> Result<()>

Serialize this object to the given writer.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Ungil for T
where T: Send,