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