Function datafusion_expr::utils::columnize_expr
source · pub fn columnize_expr(e: Expr, input: &LogicalPlan) -> Result<Expr>
Expand description
Convert an expression into Column expression if it’s already provided as input plan.
For example, it rewrites:
.aggregate(vec![col("c1")], vec![sum(col("c2"))])?
.project(vec![col("c1"), sum(col("c2"))?
Into:
.aggregate(vec![col("c1")], vec![sum(col("c2"))])?
.project(vec![col("c1"), col("SUM(c2)")?