alamb commented on PR #7180: URL: https://github.com/apache/arrow-datafusion/pull/7180#issuecomment-1671311059
I have been thinking about this PR and implementing `LIMIT` in general It is my opinion that we could keep DataFusion simpler *and* make this query faster and use less memory by implementing a real `TopKExec` rather than trying to optimize `SortExec` more The basic idea would be to keep a heap of the top K items (using Row Format / specialization for single columns) and I think we could even prototype the idea using the same `SortExec` but using a different stream when there was a fetch. Given how important Sort / Limit is I would like to help. What do you think @gruuya and @Dandandan and @ozankabak ? -- 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]
