You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/06/27 12:46:42 UTC
[GitHub] [shardingsphere] SteNicholas opened a new pull request #6192: sqlserver top expression
SteNicholas opened a new pull request #6192:
URL: https://github.com/apache/shardingsphere/pull/6192
Fixes #4867.
Changes proposed in this pull request:
- Correct the `TOP` definition in `DMLStatement.g4` of SQLServer.
- Add function `visitTop()` of SQLServerDMLVisitor to parse out `NumberLiteralRowNumberValueSegment`.
- Modify `visitProjection()` of SQLServerDMLVisitor to parse out `TopProjectionSegment`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on a change in pull request #6192: Parse `Top(expression)` query of SQLServer with ANTLR
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #6192:
URL: https://github.com/apache/shardingsphere/pull/6192#discussion_r446636590
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/SQLServerKeyword.g4
##########
@@ -918,3 +918,11 @@ GEOMETRY
GEOGRAPHY
: G E O G R A P H Y
;
+
+TIES
Review comment:
They are keywords defined by `SQLServer Official document`, aren't they?
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/visitor/impl/SQLServerDMLVisitor.java
##########
@@ -304,6 +309,11 @@ public ASTNode visitProjection(final ProjectionContext ctx) {
return result;
}
AliasSegment alias = null == ctx.alias() ? null : (AliasSegment) visit(ctx.alias());
+ if (null != ctx.top()) {
Review comment:
Does this PR fully fix #4867 or need subsequent PRs?
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/SQLServerKeyword.g4
##########
@@ -918,3 +918,11 @@ GEOMETRY
GEOGRAPHY
: G E O G R A P H Y
;
+
+TIES
+ : T I E S
+ ;
+
+PERCENT
+ : P E R C E N T
+ ;
Review comment:
A blank line is required at the end.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on pull request #6192: Parse `Top(expression)` query of SQLServer with ANTLR
Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #6192:
URL: https://github.com/apache/shardingsphere/pull/6192#issuecomment-653762239
@SteNicholasSince it becomes in conflicts with #6263, which covered this PR wholly, I have to close it. Sorry about that, and thanks as well.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero closed pull request #6192: Parse `Top(expression)` query of SQLServer with ANTLR
Posted by GitBox <gi...@apache.org>.
tristaZero closed pull request #6192:
URL: https://github.com/apache/shardingsphere/pull/6192
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org