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

 ##########
 File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/visitor/MySQLDCLVisitor.java
 ##########
 @@ -82,4 +89,21 @@ 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_()) {
 
 Review comment:
   if (true), it is better to overwrite `visitOnObjectClause_()` and move the 
content of `if condition` to the new function. Don't you think so?

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