rkrishn7 commented on PR #27499: URL: https://github.com/apache/datafusion/pull/27499#issuecomment-7086386469
> 1. It constrains future refactors (e.g triyng to make blocked allocation) > 2. It is easy to potentially break inadvertently in a refactor, especially if it is only covered by unit tests, and relies on particular internal state) Both good points, agreed. I think this approach suffers from the fact that it adds a non-trivial amount of additional surface area, that to your point is new and can easily break in a future refactor. Thought a bit more about it and I think we can refactor existing `intern()` implementations to make insertion optional with no measurable overhead. So a new API like `find()` would simply call the same inner method used in `intern()`. I think it addresses your second point on inadvertent breakage since both paths share mostly the same code (modulo a couple branches). Though, this doesn't mean the new API itself gets used in-tree. I think this might be a fine tradeoff, though? It greatly reduces the amount of new code to maintain while still adding a useful public API. I have a draft PR in https://github.com/apache/datafusion/pull/27664 for reference. Curious whether it seems like an acceptable tradeoff to you. -- 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]
