Function datafusion_physical_expr::utils::normalize_sort_exprs
source · pub fn normalize_sort_exprs(
sort_exprs: &[PhysicalSortExpr],
eq_properties: &[EquivalentClass],
ordering_eq_properties: &[OrderingEquivalentClass]
) -> Vec<PhysicalSortExpr>Expand description
Transform sort_exprs vector, to standardized version using eq_properties and ordering_eq_properties
Assume eq_properties states that Column a and Column b are aliases.
Also assume ordering_eq_properties states that ordering vec![d ASC] and vec![a ASC, c ASC] are
ordering equivalent (in the sense that both describe the ordering of the table).
If the sort_exprs input to this function were vec![b ASC, c ASC],
This function converts sort_exprs vec![b ASC, c ASC] to first vec![a ASC, c ASC] after considering eq_properties
Then converts vec![a ASC, c ASC] to vec![d ASC] after considering ordering_eq_properties.
Standardized version vec![d ASC] is used in subsequent operations.