alamb commented on PR #27499:
URL: https://github.com/apache/datafusion/pull/27499#issuecomment-7060838698

   > In my mind it comes down to whether we view these APIs as a public 
building block. If so, I think being able to probe a GroupValues seems like a 
generally useful addition, though I can't speak to other use cases that may 
require it right now. But if they exist only to serve the in-tree execution 
plans, then maybe not.
   
   I agree this is the key distinction and I think committing some pretty deep 
structure as a public API is potentially problematic in 2 ways:
   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)
   
   Thus I would like to suggest either:
   1. Add some accessor to get at the state (like `into_parts()` for Arrow 
arrays) so your code can get access to the state it needs, and then reconstruct 
the relevant values -- this would let you keep all the manipulation code 
outside DataFusion
   2. (better) Find some way to refactor existing code so that it calls the new 
API you are adding -- that way you can use the same code as the rest of 
DataFusion


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

Reply via email to