-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[ESQL] Adds planner implementation for LIMIT BY #144069
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
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
5753f59
[ESQL] Adds parsing and planner wiring for LIMIT BY
ncordon 9052bcb
Removes duplicated LIMIT in data node
ncordon 41d3029
Addresses copilot review
ncordon 724436f
Fixes last tests
ncordon 87a6f9c
Merge remote-tracking branch 'upstream/main' into esql-limit-by-plann…
ncordon 19b968d
Fixes merge
ncordon 70641f6
Merge remote-tracking branch 'upstream/main' into esql-limit-by-plann…
ncordon 4dd8922
Merge branch 'main' into esql-limit-by-planner-alt
ncordon 5acbd44
Removes coordinator thingy from LimitBy
ncordon 98d0f9a
Addresses some pr review feedback
ncordon 0300b23
[CI] Auto commit changes from spotless
a68f6c8
Merge branch 'main' into esql-limit-by-planner-alt
ncordon 7c26ac1
Reverts some changes
ncordon b91d97c
Adds qualified names
ncordon 6e2f9df
Cleans parser tests
ncordon b34081c
Add LOOKUP JOIN tests
ncordon 25ae635
Corrects comment
ncordon 31ffe90
Merge remote-tracking branch 'upstream/main' into esql-limit-by-plann…
ncordon 8d9a7eb
Solves compilation errors
ncordon 91f8649
Removes non relevant test
ncordon 4e95450
Fixes golden tests
ncordon 8a855f7
Merge remote-tracking branch 'upstream/main' into esql-limit-by-plann…
ncordon e6b0a8c
Merge branch 'main' into esql-limit-by-planner-alt
ncordon 8c0c750
Merge branch 'main' into esql-limit-by-planner-alt
ncordon adaf691
Gates all LIMIT_BY tests
ncordon 3c69444
Merge remote-tracking branch 'upstream/main' into esql-limit-by-plann…
ncordon aa83c35
Renames limit -> limitPerGroup
ncordon 6a03c4e
Adds missing capability
ncordon 61c7f98
Merge remote-tracking branch 'upstream/main' into esql-limit-by-plann…
ncordon 3893bf6
Last nits
ncordon 6cf1897
Merge branch 'main' into esql-limit-by-planner-alt
ncordon 8107ab6
Merge branch 'main' into esql-limit-by-planner-alt
ncordon 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
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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Do we need this limit here and in other cases? I believe we have much fewer records in employees, especially above condition.
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.
Is it to avoid sorts over the entire result set?
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.
Technically no, as the default "limit 1000" automatically added. We can remove it
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.
Maybe it is to avoid warning about default limit?
I do not think it is suppressed by new limit by, is it?
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.
It's not, so yes, it could be for the warning 👀
Uh oh!
There was an error while loading. Please reload this page.
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 want stable results so we have to use SORT, but we cannot use SORT + LIMIT BY yet because we need a different logical and physical plan for that, so it's disallowed. The intermediate LIMIT is just temporary. I've added removing it as a task to do in the future so we don't forget: https://github.com/elastic/esql-planning/issues/262