-
Notifications
You must be signed in to change notification settings - Fork 853
APM-786 heap sort with stored values #19551
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
Conversation
…-sort-stored-values
…-sort-stored-values
…-sort-stored-values
…-sort-stored-values
…-sort-stored-values
@@ -130,51 +130,101 @@ lookupCollection(arangodb::transaction::Methods& trx, DataSourceId cid, | |||
} | |||
} | |||
|
|||
constexpr int kSortMultiplier[]{-1, 1}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constexpr int kSortMultiplier[]{-1, 1}; | |
inline constexpr int kSortMultiplier[]{-1, 1}; |
…-sort-stored-values
…-sort-stored-values
void setScoresSort(std::span<std::pair<size_t, bool> const> s) noexcept { | ||
_scoresSort = s; | ||
void setHeapSort(std::span<iresearch::HeapSortElement const> s, | ||
iresearch::IResearchViewNode::ViewValuesRegisters const& |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make it "flat_map"/just sorted vector of pairs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can think about this. But let's do it in a separate PR as this one is already big enough.
Scope & Purpose
Adds ability to use constrained heap optimization for view queries with using stored values/primary sort
Enterprise PR: https://github.com/arangodb/enterprise/pull/1349
Checklist
Related Information
(Please reference tickets / specification / other PRs etc)