masonh22 commented on PR #25659:
URL: https://github.com/apache/datafusion/pull/25659#issuecomment-5816004842

   > > we will occasionally feed the state from an `AggregateUDFImpl`'s groups 
accumulator into it's regular, non-grouped accumulator.
   > 
   > Thank you for this PR, this looks like an interesting use case. However, 
this isn't a supported pattern in DataFusion, and I'd suggest not introducing 
special cases for it, since they add complexity.
   > 
   > WDYT about doing it downstream? It seems quite doable, since it only 
requires forking one aggregate function.
   
   Fair point, but I feel like this will inevitably lead to us forking/wrapping 
every aggregate function we use, which would not be ideal.  I did file #25660 
to discuss making this a supported pattern.  I implemented a fuzz test I can 
share that is able to enforce this requirement.
   
   As an alternative to this, would you be open to a PR that applies the same 
optimization used by the groups accumulator to the regular accumulators?  That 
would solve the problem I'm running into and potentially benefit the regular 
accumulators.  What do you think?


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