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 2022/04/12 03:47:14 UTC

[GitHub] [shardingsphere] tuichenchuxin commented on a diff in pull request #16744: support visit and route logic table in comment statement

tuichenchuxin commented on code in PR #16744:
URL: https://github.com/apache/shardingsphere/pull/16744#discussion_r847924423


##########
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/visitor/statement/impl/OpenGaussDDLStatementSQLVisitor.java:
##########
@@ -747,7 +750,35 @@ public ASTNode visitDeclare(final DeclareContext ctx) {
     }
     
     @Override
+    @SuppressWarnings("unchecked")
     public ASTNode visitComment(final CommentContext ctx) {
-        return new OpenGaussCommentStatement();
+        OpenGaussCommentStatement result = new OpenGaussCommentStatement();
+        if (null != ctx.commentClauses().objectTypeAnyName() && null != ctx.commentClauses().objectTypeAnyName().TABLE()) {
+            LinkedList<NameSegment> nameSegments = (LinkedList<NameSegment>) ((CollectionValue<NameSegment>) visit(ctx.commentClauses().anyName())).getValue();

Review Comment:
   Thank you. Done.



-- 
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