tianbin1001 commented on a change in pull request #4190: Add mysql grant 
visitor for DCLStatement
URL: 
https://github.com/apache/incubator-shardingsphere/pull/4190#discussion_r376271759
 
 

 ##########
 File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/visitor/MySQLDCLVisitor.java
 ##########
 @@ -82,4 +92,34 @@ public ASTNode visitRenameUser(final RenameUserContext ctx) 
{
     public ASTNode visitSetPassword(final SetPasswordContext ctx) {
         return new SetPasswordStatement();
     }
+
+    @Override
+    public ASTNode visitGrant(final GrantContext ctx) {
+        GrantStatement result = new GrantStatement();
+        PrivilegeClause_Context privilegeClause = ctx.privilegeClause_();
+        if (null != privilegeClause && null != 
privilegeClause.onObjectClause_()) {
+            PrivilegeLevel_Context privilegeLevel = 
privilegeClause.onObjectClause_().privilegeLevel_();
+            TableNameContext tableNameContext = privilegeLevel.tableName();
+            if (null != tableNameContext) {
+                TableSegment tableSegment = 
createTableSegment(tableNameContext);
 
 Review comment:
   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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to