-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 parsing SQL Server INSERT INTO sql #29152 #29329
Conversation
@@ -151,7 +152,7 @@ sequenceName | |||
; | |||
|
|||
tableName | |||
: (owner DOT_)? name | |||
: ((databaseName DOT_)? owner DOT_)? name |
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.
Hi according to the definition of SQL Server insert syntax, databaseName is a selection pattern.
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.
Hello, could you please tell me how to modify here, thank you
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.
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 can use the selection mode of antlr.
; | ||
|
||
scriptVariableName | ||
: DOLLAR_ LP_ name RP_ |
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.
Can we put this grammar rule definition in columnName?
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.
In SqlServer,
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.
Okay, I understand. Thank you for your explanation
ref: https://learn.microsoft.com/en-us/sql/tools/sqlcmd/sqlcmd-use-scripting-variables?view=sql-server-ver16
...a/org/apache/shardingsphere/sql/parser/sql/common/value/literal/impl/StringLiteralValue.java
Outdated
Show resolved
Hide resolved
Hi @TherChenYang, can you refer the original issue? I will assign it to you. |
Thank you. The corresponding issue is this one #29152 |
@zihaoAK47 Hello, I have refactored the code according to your request. Please review it again. Thank you very mach |
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.
Great PR, thank you
Fixes #29152.
Changes proposed in this pull request:
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
.