alamb commented on issue #22583: URL: https://github.com/apache/datafusion/issues/22583#issuecomment-4565340290
> I don't have a concrete idea here, but I do wonder whether this (and other "fast-path" optimizer work) is a symptom of an underlying problem -- it should be possible to express tree rewrites in a way where we shouldn't do any copies or tree manipulation if the rewrite doesn't fire. Yes -- I think the core primitive that is needed to express this is mutable tree rewrites -- now we either need to walk/copy the entire tree or else do two passes If we allowed mutations intead (aka `&mut`) in some cases we could do the walk and then rewrite in place if needed without forcing a copy @adriangb did something like this for subqueries recently - https://github.com/apache/datafusion/pull/22298 Maybe we can do soemthing similar here -- 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]
