-
Notifications
You must be signed in to change notification settings - Fork 763
Sorted Merge: Eliminate coordinator Sort node for multi-shard ORDER BY queries #8529
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
Open
neildsh
wants to merge
18
commits into
citusdata:main
Choose a base branch
from
neildsh:sortedMerge
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7eb2108
Add sorted merge foundation: GUC, struct fields, and serialization
neildsh 3e3e3b7
Add planner eligibility and worker sort pushdown for sorted merge
neildsh cd99710
Add per-task tuple stores and k-way merge for sorted merge
neildsh 7bd9123
Add sorted merge foundation: GUC, struct fields, and serialization
neildsh 1baefd6
Add more comprehensive tests for sorted merge
neildsh 3a80aac
Minor code clean up
neildsh b00cc93
Added subquery tests
neildsh 8ed417c
Put multi_orderby_pushdown in its own test group
neildsh 0bf44ff
Replace the use of memcpy with memcpy_s and add ORDER BY to CTE test …
neildsh 0eb923c
Emit more verbose output for EXPLAIN in sorted merge tests. Alphabeti…
neildsh 9437018
Use explain_filter to normalize regress test output
neildsh 49e9b93
Added more tests per feedback
neildsh d92b551
Incorporate code review feedback and add more test cases as well as a…
neildsh 8b4ba36
Added test cases with volatile/stable functions
neildsh 86f82a1
Make style checks happy
neildsh 4bb3811
Fix the issue where EXPLAIN ANALYZE uses sorted merge for the distrib…
neildsh 0ed36fd
Added auto explain test category
neildsh 499e5e3
add more test cases for auto explain with duplicates
neildsh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Suggestion: keep sorted merge state in a data structure that hangs off
CitusScanState. That data structure can be private to sorted_merge, and sorted_merge has something like this strawman API:This fits into the canonical Postgres flow - for example per-task tuplestores are closed in the Cleanup function, which would be called by
CitusEndScan()andCitusReScan(), as opposed to an if statement in adaptive executor, which looks a bit ad-hoc tbh.