milenkovicm opened a new issue, #8428: URL: https://github.com/apache/arrow-datafusion/issues/8428
### Is your feature request related to a problem or challenge? This task is related to #7858, to follow up with some issues we've found with `HashAggregationExec`. Specific issue we found is that during spill `HashAggregationExec` will sort and spill aggregation buffer, while sorting it will allocate buffer as big as current aggregation state https://github.com/apache/arrow-datafusion/blob/7acd8833cc5d03ba7643d4ae424553c7681ccce8/datafusion/physical-plan/src/aggregates/row_hash.rs#L672 This will make operator using (twice) more memory than already allocated by the memory manager. We need to find a solution which would respect allocated memory limit Some ides can be find in the #7858, more specific in comments: - https://github.com/apache/arrow-datafusion/issues/7858#issuecomment-1769367404 - https://github.com/apache/arrow-datafusion/issues/7858#issuecomment-1769584341 - https://github.com/apache/arrow-datafusion/issues/7858#issuecomment-1770357507 but we are open for other ideas as well ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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]
