peter-toth commented on code in PR #7942:
URL: https://github.com/apache/arrow-datafusion/pull/7942#discussion_r1432791601
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -311,60 +309,63 @@ impl LogicalPlan {
exprs
}
- /// 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>
+ /// Apply `f` on expressions of the plan node.
+ /// `f` is not allowed to return [`TreeNodeRecursion::Prune`].
Review Comment:
Here we basically iterate over the expressions in a logical plan tree node
and apply `f` on each. Those expressions are the root nodes of expressions
trees and the trees have no connection with each other. (Maybe we can think of
them as siblings?)
So actually, I'm a bit uncertain about what should we do if `f` returns
`Prune` here. (Other `TreeNodeRecursion` elements are clear how to proceed.)
Shall we handle `Prune` as `Continue` and proceed to the next expression?
--
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]