adriangb commented on code in PR #19538:
URL: https://github.com/apache/datafusion/pull/19538#discussion_r2654774080
##########
datafusion/optimizer/src/optimize_projections/mod.rs:
##########
@@ -591,11 +589,6 @@ fn merge_consecutive_projections(proj: Projection) ->
Result<Transformed<Project
}
}
-// Check whether `expr` is trivial; i.e. it doesn't imply any computation.
-fn is_expr_trivial(expr: &Expr) -> bool {
- matches!(expr, Expr::Column(_) | Expr::Literal(_, _))
-}
Review Comment:
As evidenced by the existing functions for both logical and physical
expressions this was already a concept and implementation within the codebase,
so all this PR is really doing is allowing arbitrary functions / expressions to
declare themselves as trivial.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]