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

   > What is the usecase for this function? It seems like it is adding code 
that is not used by the core anywhere, so maybe it is unlikely to be used by 
other users?
   
   Yeah that's a fair point @alamb. Our implementation uses these aggregation 
APIs directly, rather than via the in-tree aggregation execution plans. Without 
getting into too much detail, we essentially keep multiple `GroupValues` around 
and need to check if a key exists in one of those instances without inserting 
it, which `intern` doesn't give us. Some more context in [this 
comment](https://github.com/apache/datafusion/issues/24603#issuecomment-6699745307)
 and the [related issue](https://github.com/apache/datafusion/issues/27498).
   
   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.
   
   > maybe it is not a good thing to add to the core (as this will make 
extending / refactoring aggregators harder, for example)
   
   I think I'm aligned in spirit. Conceptually `find()` is just a subset of 
`intern()`, though in practice it does add more surface area to keep 
implementations in sync. But maybe I'm missing something else you're thinking 
of?


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