alamb commented on code in PR #9913:
URL: https://github.com/apache/arrow-datafusion/pull/9913#discussion_r1554563916
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -285,57 +287,57 @@ impl LogicalPlan {
/// Calls `f` on all expressions (non-recursively) in the current
/// logical plan node. This does not include expressions in any
/// children.
- pub fn inspect_expressions<F, E>(self: &LogicalPlan, mut f: F) ->
Result<(), E>
- where
- F: FnMut(&Expr) -> Result<(), E>,
- {
+ pub fn apply_expressions<F: FnMut(&Expr) -> Result<TreeNodeRecursion>>(
Review Comment:
Actually, I found another pattern here:
https://github.com/apache/arrow-datafusion/blob/d201ec742b08fa2a0549fc27f0b39622d67391ab/datafusion/expr/src/utils.rs#L684
Maybe we can pull this part (add `apply_expressions` into a separate PR)? I
think it would be valuable in its own -- for example it could be used to void
the `expressions()` copy here:
https://github.com/apache/arrow-datafusion/blob/27bdf3c8c976874aae2417cb2aa435448832ecc0/datafusion/optimizer/src/analyzer/subquery.rs#L236-L241
It could also make this PR smaller
--
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]