datafusion_expr::expr_rewriter

Function rewrite_sort_cols_by_aggs

Source
pub fn rewrite_sort_cols_by_aggs(
    sorts: impl IntoIterator<Item = impl Into<Sort>>,
    plan: &LogicalPlan,
) -> Result<Vec<Sort>>
Expand description

Rewrite sort on aggregate expressions to sort on the column of aggregate output For example, max(x) is written to col("max(x)")