Path: blob/main/crates/polars-parquet/src/parquet/metadata/column_order.rs
6940 views
#[cfg(feature = "serde")]1use serde::{Deserialize, Serialize};23use super::sort::SortOrder;45/// Column order that specifies what method was used to aggregate min/max values for6/// statistics.7///8/// If column order is undefined, then it is the legacy behaviour and all values should9/// be compared as signed values/bytes.10#[derive(Debug, Clone, Copy, PartialEq, Eq)]11#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]12pub enum ColumnOrder {13/// Column uses the order defined by its logical or physical type14/// (if there is no logical type), parquet-format 2.4.0+.15TypeDefinedOrder(SortOrder),16/// Undefined column order, means legacy behaviour before parquet-format 2.4.0.17/// Sort order is always SIGNED.18Undefined,19}2021impl ColumnOrder {22/// Returns sort order associated with this column order.23pub fn sort_order(&self) -> SortOrder {24match *self {25ColumnOrder::TypeDefinedOrder(order) => order,26ColumnOrder::Undefined => SortOrder::Signed,27}28}29}303132