Dandandan commented on issue #3516:
URL: 
https://github.com/apache/arrow-datafusion/issues/3516#issuecomment-1250258614

   > > Already with the current implementation we should be able to rewrite it 
to:
   > 
   > I agree this would help performance. However, it will become irrelevant 
if/when we implement a real TopK operator
   
   I imagine a similar optimization is still useful with a TopK operator. The 
example TopK operator in the tests still works only a single partition and 
can't run in parallel. I think you'll still need a "nested" TopK operator 
similar to the above plan to achieve the parallelization. So at the moment 
there is a TopK operator, we can change it to utilize this.
   
   Of course the TopK operator will use way less memory - but in terms of 
performance for simple queries that can be executed in memory, the rewrite 
should probably already have a big benefit.


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

Reply via email to