You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/03/15 11:38:34 UTC

[GitHub] [arrow-datafusion] tustvold commented on issue #5583: How to modify `OptimizerRule` fields?

tustvold commented on issue #5583:
URL: https://github.com/apache/arrow-datafusion/issues/5583#issuecomment-1469847486

   This might be a naive question, but shouldn't OptimizerRules be pure, i.e. side-effect free. I think taking `&mut self` not only runs the risk of making OptimizerRule sensitive but also lead to unbounded memory usage - the `OptimizerRule` are created once per `SessionContext`.
   
   I'm not familiar with the more recent changes in this space, but I would have expected the `OptimizerRule` to walk the tree itself to perform this rewrite, similar to how `PhysicalOptimizerRule` such as `EnforceDistribution` perform nested rewrites


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