MCPcopy Create free account
hub / github.com/apache/datafusion / normalize_sorts

Function normalize_sorts

datafusion/expr/src/expr_rewriter/mod.rs:124–136  ·  view source on GitHub ↗
(
    sorts: impl IntoIterator<Item = impl Into<Sort>>,
    plan: &LogicalPlan,
)

Source from the content-addressed store, hash-verified

122}
123
124pub fn normalize_sorts(
125 sorts: impl IntoIterator<Item = impl Into<Sort>>,
126 plan: &LogicalPlan,
127) -> Result<Vec<Sort>> {
128 sorts
129 .into_iter()
130 .map(|e| {
131 let sort = e.into();
132 normalize_col(sort.expr, plan)
133 .map(|expr| Sort::new(expr, sort.asc, sort.nulls_first))
134 })
135 .collect()
136}
137
138/// Recursively replace all [`Column`] expressions in a given expression tree with
139/// `Column` expressions provided by the hash map argument.

Callers 3

with_sort_exprMethod · 0.85
sort_with_limitMethod · 0.85
select_to_planMethod · 0.85

Calls 6

normalize_colFunction · 0.85
newFunction · 0.85
collectMethod · 0.80
mapMethod · 0.45
into_iterMethod · 0.45
intoMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…