Function datafusion_optimizer::utils::rewrite_preserving_name
source · pub fn rewrite_preserving_name<R>(expr: Expr, rewriter: &mut R) -> Result<Expr>where
R: ExprRewriter<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 optimzing plans to ensure the the output schema of plan nodes don’t change after optimization