Function datafusion_expr::expr_rewriter::rewrite_preserving_name
source · pub fn rewrite_preserving_name<R>(expr: Expr, rewriter: &mut R) -> Result<Expr>where
R: TreeNodeRewriter<N = Expr>,
Expand description
Rewrites expr
using rewriter
, ensuring that the output has the
same name as expr
prior to rewrite, adding an alias if necessary.
This is important when optimizing plans to ensure the output schema of plan nodes don’t change after optimization