You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zihaoAK47 (via GitHub)" <gi...@apache.org> on 2023/07/05 06:42:47 UTC
[GitHub] [shardingsphere] zihaoAK47 opened a new pull request, #26771: Support MySQL LATERAL query parse
zihaoAK47 opened a new pull request, #26771:
URL: https://github.com/apache/shardingsphere/pull/26771
Ref #25535.
Changes proposed in this pull request:
- Support MySQL LATERAL query parse
- Add test sql
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ✓] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ✓] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ✓] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ✓] I have added corresponding unit tests for my changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #26771: Support MySQL LATERAL query parse
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771#discussion_r1252765503
##########
parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/DMLStatement.g4:
##########
@@ -287,7 +287,10 @@ tableReference
;
tableFactor
- : tableName partitionNames? (AS? alias)? indexHintList? | subquery AS? alias (LP_ columnNames RP_)? | LP_ tableReferences RP_
Review Comment:
I think this priority can be slightly lower, you can try to handle the unsupported sql parsing first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #26771: Support MySQL LATERAL query parse
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771#discussion_r1252784667
##########
parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/DMLStatement.g4:
##########
@@ -287,7 +287,10 @@ tableReference
;
tableFactor
- : tableName partitionNames? (AS? alias)? indexHintList? | subquery AS? alias (LP_ columnNames RP_)? | LP_ tableReferences RP_
Review Comment:
I think wechat is better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zihaoAK47 commented on a diff in pull request #26771: Support MySQL LATERAL query parse
Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on code in PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771#discussion_r1252793302
##########
parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/DMLStatement.g4:
##########
@@ -287,7 +287,10 @@ tableReference
;
tableFactor
- : tableName partitionNames? (AS? alias)? indexHintList? | subquery AS? alias (LP_ columnNames RP_)? | LP_ tableReferences RP_
Review Comment:
Has been sent to your email
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #26771: Support MySQL LATERAL query parse
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771#discussion_r1252680333
##########
parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/DMLStatement.g4:
##########
@@ -287,7 +287,10 @@ tableReference
;
tableFactor
- : tableName partitionNames? (AS? alias)? indexHintList? | subquery AS? alias (LP_ columnNames RP_)? | LP_ tableReferences RP_
Review Comment:
Do you think we should refactor antlr parse logic accord to MySQL yacc?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zihaoAK47 commented on a diff in pull request #26771: Support MySQL LATERAL query parse
Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on code in PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771#discussion_r1252779855
##########
parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/DMLStatement.g4:
##########
@@ -287,7 +287,10 @@ tableReference
;
tableFactor
- : tableName partitionNames? (AS? alias)? indexHintList? | subquery AS? alias (LP_ columnNames RP_)? | LP_ tableReferences RP_
Review Comment:
Of course, does the contact information use WeChat, phone number, or Twitter
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu merged pull request #26771: Support MySQL LATERAL query parse
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu merged PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zihaoAK47 commented on a diff in pull request #26771: Support MySQL LATERAL query parse
Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on code in PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771#discussion_r1252755547
##########
parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/DMLStatement.g4:
##########
@@ -287,7 +287,10 @@ tableReference
;
tableFactor
- : tableName partitionNames? (AS? alias)? indexHintList? | subquery AS? alias (LP_ columnNames RP_)? | LP_ tableReferences RP_
Review Comment:
Aha, it was only after going through all the rules of table_factor in MySQL yacc that I finally understood how to modify it. If want to have a better reading experience and easily refer back to MySQL yacc for future modifications, I believe refactoring is necessary. What do you think, mentor? If we need to refactor, I will start immediately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zihaoAK47 commented on pull request #26771: Support MySQL LATERAL query parse
Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771#issuecomment-1621177846
@strongduanmu Hi mentor please review
https://github.com/mysql/mysql-server/blob/8.0/sql/sql_yacc.yy#L11842
https://github.com/mysql/mysql-server/blob/8.0/sql/sql_yacc.yy#L12037
https://github.com/mysql/mysql-server/blob/8.0/sql/sql_yacc.yy#L12075
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #26771: Support MySQL LATERAL query parse
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #26771:
URL: https://github.com/apache/shardingsphere/pull/26771#discussion_r1252766237
##########
parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/DMLStatement.g4:
##########
@@ -287,7 +287,10 @@ tableReference
;
tableFactor
- : tableName partitionNames? (AS? alias)? indexHintList? | subquery AS? alias (LP_ columnNames RP_)? | LP_ tableReferences RP_
Review Comment:
In addition, can you send your contact information to my email address? @zihaoAK47
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org