You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/18 04:55:04 UTC

[GitHub] [arrow-datafusion] jackwener commented on issue #4267: [EPIC]: reimplement all rules which contains global-state

jackwener commented on issue #4267:
URL: https://github.com/apache/arrow-datafusion/issues/4267#issuecomment-1319545030

   let me explain why.
   
   Due to global-state exists, we can't just optimize a subtree, we must traverse the whole tree.
   
   In fact, I prefer to `Pattern-match`, we match a subtree `pattern`, and just optimize the pattren/subtree.
   
   A example: Merge Limit
   
   ```rust
   match plan {
        Limit =>  {
              match childPlan => {
                 Limit => {  merge(limit, childlimit)  }
                  _ => { don't match pattern, return None or recurse....}
              }
        }
        _ => { don't match pattern, return None or recurse....}
   }
   ```
   
   we just match `limit-limit`, and handle it.
   
   BUT, global-state force we must handle various situations, and we must traverse the tree all.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org