-
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
Added Support for SQL Server INSERT INTO Parsing #29230
Conversation
@@ -154,6 +154,10 @@ tableName | |||
: (owner DOT_)? name | |||
; | |||
|
|||
tempTableName |
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.
What is the different between tableName and tempTableName?
@@ -2900,4 +2900,36 @@ | |||
</from> | |||
</select> | |||
</insert> | |||
<insert sql-case-id="insert_into_my_temp_table_1"> |
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.
Where is the orginal sql?
</values> | ||
</insert> | ||
|
||
<insert sql-case-id="insert_into_temp_table_2"> |
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.
Please rename sql-case-id to more meaningful name.
</expression-projection> | ||
</projections> | ||
<from> | ||
<simple-table name="#t" start-index="23" stop-index="25"> |
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.
Please use <simple-table><simple-table />
if it doesn't have child node.
I've encountered an issue during testing where I consistently receive the following error:
Could someone provide a hint or suggestions on what might be causing this issue? I think parser doesn't get it what is |
Hi @BykaWF, What does |
@strongduanmu In SQL Server, the # symbol means temporary tables, which are session-specific and automatically dropped when the session ends. |
@BykaWF Thank you for your explaination, I think you can add a temp table rule for this case. |
@strongduanmu @BykaWF This problem is because # is set to comment in Comment.g4, but there are only two annotation rules ’-- ‘ and ’/* */‘ in the syntax of sqlServer, and there is no #, so this problem occurs. You can refer to this pr #29394 |
@TherChenYang thanks for helping |
Hi @BykaWF, can you solve code conflict? |
I've addressed the issues pointed out in the previous review. Could you @strongduanmu please review this updated version? Thank you! |
Hi @BykaWF, can you solve the latest code conflict? |
Hi @strongduanmu, yes I can |
# Conflicts: # test/it/parser/src/main/resources/case/dml/insert.xml # test/it/parser/src/main/resources/sql/supported/dml/insert.xml
Update brunch
Since this pr has long time no response, I will close it. You can submit new pr when you are free. |
Fixes #29194.
Changes proposed in this pull request:
It adds support for parsing the following SQL Server INSERT INTO statements:
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
.