yashrb24 opened a new issue, #26772:
URL: https://github.com/apache/datafusion/issues/26772

   
   `WindowAggExec` and grouped TopK return their entire result in one 
`RecordBatch`. They ignore the `datafusion.execution.batch_size` setting and 
can cause a single poll to do much more work than expected. Another side-effect 
being the next operator can receive a large batch.
   
   References:
   1. 
https://github.com/apache/datafusion/blob/350ca76505c9513d16e7dd9910bcd9bde2c911ed/datafusion/physical-plan/src/windows/window_agg_exec.rs#L607-L627
   2. 
https://github.com/apache/datafusion/blob/350ca76505c9513d16e7dd9910bcd9bde2c911ed/datafusion/physical-plan/src/aggregates/grouped_topk_stream.rs#L268-L293
   
   Related:
   1. #19481 - attempts to cover all blocking operators emitting oversized 
final batches
   2. #23206 - originally identifies the gap for `WindowAggExec` but was closed 
without merging.
   
   I believe there's a simpler fix here for the above 2 cases, both already 
materialize their final result so we can just use `RecordBatch::slice` method 
and it should be sufficient for these paths. Something along the lines of 
#23206 implemented


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