pub(crate) fn unproject_sort_expr(
sort_expr: SortExpr,
agg: Option<&Aggregate>,
input: &LogicalPlan,
) -> Result<SortExpr>Expand description
Transforms all Column expressions in a sort expression into the actual expression from aggregation or projection if found. This is required because if an ORDER BY expression is present in an Aggregate or Select, it is replaced with a Column expression (e.g., “sum(catalog_returns.cr_net_loss)”). We need to transform it back to the actual expression, such as sum(“catalog_returns”.“cr_net_loss”).