-
Notifications
You must be signed in to change notification settings - Fork 6.8k
MySQL WITH clause recursive subquery error fix #35146
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
base: master
Are you sure you want to change the base?
MySQL WITH clause recursive subquery error fix #35146
Conversation
…nto ISSUE_WITH_QUERY_RECURSIVE_SUBQUERY_ERROR
Hello @strongduanmu can you review this PR and add enhancement label to this PR |
@Yash-cor Can you submit a pr to describe the exception first? |
Ok I will file an Issue for this |
|
…nto MySQL_WITH_CLAUSE_RECURSIVE_SUBQUERY_ERROR
…nto MySQL_WITH_CLAUSE_RECURSIVE_SUBQUERY_ERROR
Fixes #35164.
Changes proposed in this pull request:
When RECURSIVE is used in WITH clause of MySQL it was not able to catch the Shorthand Projection of an existing table.
Made changes so that it supports it now.
For Example -
WITH RECURSIVE cte AS ( SELECT * from t_user UNION ALL SELECT user_id+1, name FROM cte WHERE user_id < 5 ) SELECT * FROM cte
;So in this CommonTableExpressionSegmentBinder was not catching the shorthand projection segment when RECURSIVE keyword is used and that cte alias is used inside the subquery.
Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e
.