8000 APM-786 heap sort with stored values by Dronplane · Pull Request #19551 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 33 commits into from
Aug 14, 2023

Conversation

Dronplane
Copy link
Contributor
@Dronplane Dronplane commented Aug 9, 2023

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

  • 💩 Bugfix
  • 🍕 New feature
  • 🔥 Performance improvement
  • 🔨 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 📖 CHANGELOG entry made
  • 📚 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.11: (Please link PR)
    • Backport for 3.10: (Please link PR)
    • Backport for 3.9: (Please link PR)

Related Information

(Please reference tickets / specification / other PRs etc)

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

@cla-bot cla-bot bot added the cla-signed label Aug 9, 2023
@Dronplane Dronplane marked this pull request as ready for review August 9, 2023 20:55
@Dronplane Dronplane requested review from a team as code owners August 9, 2023 20:55
@Dronplane Dronplane requested a review from a team August 9, 2023 20:55
@@ -130,51 +130,101 @@ lookupCollection(arangodb::transaction::Methods& trx, DataSourceId cid,
}
}

constexpr int kSortMultiplier[]{-1, 1};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
constexpr int kSortMultiplier[]{-1, 1};
inline constexpr int kSortMultiplier[]{-1, 1};

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&
Copy link
Contributor

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?

Copy link
Contributor Author
@Dronplane Dronplane Aug 11, 2023

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.

@Dronplane Dronplane merged commit 3124f9c into devel Aug 14, 2023
@Dronplane Dronplane deleted the feature/APM-786-heap-sort-stored-values branch August 14, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0