Dandandan commented on code in PR #21749:
URL: https://github.com/apache/datafusion/pull/21749#discussion_r3115195936


##########
datafusion/common/src/tree_node.rs:
##########
@@ -805,14 +807,24 @@ impl<'a, T: 'a, C: TreeNodeContainer<'a, T>> 
TreeNodeContainer<'a, T> for Box<C>
     }
 
     fn map_elements<F: FnMut(T) -> Result<Transformed<T>>>(
-        self,
+        mut self,
         f: F,

Review Comment:
   Optimizing this API is great, but I wonder two things:
   
   * Do we call this API too much in some passes? i.e. should we make some 
optimizer pass more efficient by avoiding / reducing the need to call this API 
at all in some places?
   * Are we using the "wrong" abstractions that inherently lead to inneficient 
code? (I.e. lot's of closures, branches, nesting -> hard to optimize for 
compiler) 



-- 
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]

Reply via email to