You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "TherChenYang (via GitHub)" <gi...@apache.org> on 2023/12/13 08:11:32 UTC
[PR] Remove incorrect SqlServer annotation syntax [shardingsphere]
TherChenYang opened a new pull request, #29394:
URL: https://github.com/apache/shardingsphere/pull/29394
Fixes #ISSUSE_ID.
Changes proposed in this pull request:
- Remove incorrect SqlServer annotation syntax
There are only two annotation rules '--'and '/* */' in the syntax of sqlServer, and there is no '#',Below is the official website address
https://learn.microsoft.com/zh-cn/sql/t-sql/language-elements/comment-transact-sql?view=sql-server-ver16
This problem will cause the SQL similar to 'SELECT COUNT(*) AS [Number of rows] FROM #Test' to be parsed correctly in DMLStatement.g4, but it will be parsed incorrectly in SQLServerStatement.g4 with an error message indicating a missing EOF because '#' is defined as a comment in Comments.g4, which can lead to confusion when writing parsing rules. like #29230
**result In DMLStatement.g4**

**result In SQLServerStatement.g4**

---
Before committing this PR, I'm sure that I have checked the following options:
- [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [x] I have self-reviewed the commit code.
- [] I have (or in comment I request) added corresponding labels for the pull request.
- [x] 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
Re: [PR] Remove incorrect SqlServer annotation syntax [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on PR #29394:
URL: https://github.com/apache/shardingsphere/pull/29394#issuecomment-1853506198
@TherChenYang Thank you very much for fixing this bug.
--
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
Re: [PR] Remove incorrect SqlServer annotation syntax [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu merged PR #29394:
URL: https://github.com/apache/shardingsphere/pull/29394
--
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