-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
executor: support TopN
#404
Comments
The binary-heap-plus crate may be helpful to the issue with the comparator-api support. |
That's cool! I originally thought that we might need to hand-write a binary heap as in MergeIterator... risinglight/src/storage/secondary/merge_iterator.rs Lines 11 to 34 in a2fd396
|
I'd like to try this |
When running TPC-H queries, it is possible that we have
limit
withorder by
. We can optimize this intoTopN
.TopN
executor. Simply create a new executor in https://github.com/risinglightdb/risinglight/tree/main/src/executor and add unit tests. The TopN executor should consume chunks from children, find topN of a column, and return the full row to the parent executor. Note that by saying top N, it means that top offset .. limit items.limit + order by
toTopN
. We will need to add new plan nodes in https://github.com/risinglightdb/risinglight/tree/main/src/optimizer.The text was updated successfully, but these errors were encountered: