-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support recursive CTEs #16427
Merged
Merged
Support recursive CTEs #16427
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c26bd04
Semantic analysis for recursive CTEs
systay 08b10c4
feat: add recurse operator and start of CTE planning
systay c32fb87
first steps in adding Recurse primitive
systay 55dfef9
remove subquery from cte
systay 09aa5d8
check for invalid CTEs
systay 9e8f5ba
feat: use the new CTE field on RealTable
systay c38ae57
feat: handle star expansion on CTEs
systay 705c079
first plan with recursion at the vtgate level passes
systay adedb5b
change terminology for recursice ctes to seed/term
systay 6c9ca09
codegen
systay c6277bb
panic on the error, no the string
systay 426aa01
mark query as single unsharded keyspace when possible
systay 94d8fd5
move test
systay 8fd269a
added end-to-end tests for recursive queries
systay 5746dba
also handle CTE on the LHS of joins
systay def7c28
make sure to mark CTE as recursive
systay c7470c5
rewrite expressions passing into ctes
systay b6e04a5
handle projections on the term using expressions from the seed
systay 730c3b5
handle projections on merged CTEs
systay a2ef673
add more planner tests
systay 2b4088e
test: add cte end to end tests
systay c207131
handle recursive CTE table IDs correctly
systay 8566ebe
preserve CTE table alias
systay 5f2aa27
changelog
systay efda1df
handle ws offsets on recursive ctes
systay f8501c0
remove unused code
systay 3aaad01
make sure to respect the transaction needs
systay 36a458d
address review comments
systay b67eb1a
Merge remote-tracking branch 'upstream/main' into recursive-cte
systay 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,4 @@ report | |
|
||
# mise files | ||
.mise.toml | ||
/errors/ |
This file contains 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 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 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.
Error code 3684 is duplicated. Is that an error?
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 the same on the MySQL manual. I think the duplication in Vitess it's intentional 🤷
Also, the whole page is about errors, so clearly it's an error. 😜