peter-toth commented on code in PR #10126:
URL:
https://github.com/apache/arrow-datafusion/pull/10126#discussion_r1572129964
##########
datafusion/common/src/tree_node.rs:
##########
@@ -145,40 +145,41 @@ pub trait TreeNode: Sized {
/// Convenience utility for writing optimizer rules: Recursively apply the
/// given function `f` to the tree in a bottom-up (post-order) fashion.
When
/// `f` does not apply to a given node, it is left unchanged.
- fn transform<F: Fn(Self) -> Result<Transformed<Self>>>(
+ fn transform<F: FnMut(Self) -> Result<Transformed<Self>>>(
self,
- f: &F,
+ f: &mut F,
Review Comment:
https://github.com/apache/arrow-datafusion/pull/10126/commits/d781ca714fe1ec6be25aa20f6bb15fdfc1419641
changes `TreeNode::apply()`, `TreeNode::transform()`,
`TreeNode::transform_down()`, `TreeNode::transform_up()`,
`TreeNode::transform_down_up()` and their `LogicalPlan::...with_subqueries()`
variants to use owned closures.
--
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]