peter-toth commented on code in PR #10126:
URL:
https://github.com/apache/arrow-datafusion/pull/10126#discussion_r1572031151
##########
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:
Yes, I did try this already and run into the same issue...
But now I think it is doable with some smart refactor. Let me update this PR
today or tomorrow and then we can decide if this change make sense or not
--
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]