danny0405 commented on a change in pull request #1229: [CALCITE-3085] Remove 
RelShuttleImpl#stack protected field
URL: https://github.com/apache/calcite/pull/1229#discussion_r287581113
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/RelShuttleImpl.java
 ##########
 @@ -44,24 +42,18 @@
  * any children change.
  */
 public class RelShuttleImpl implements RelShuttle {
-  protected final Deque<RelNode> stack = new ArrayDeque<>();
 
   /**
    * Visits a particular child of a parent.
    */
   protected RelNode visitChild(RelNode parent, int i, RelNode child) {
-    stack.push(parent);
-    try {
 
 Review comment:
   The stack only keep references to the Nodes objects that would never be 
garbage collected by Java during the recursive visit pattern  invoking. How can 
it be an overhead.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to