strongduanmu commented on a change in pull request #7704:
URL: https://github.com/apache/shardingsphere/pull/7704#discussion_r501048116



##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4
##########
@@ -625,10 +625,13 @@ compoundStatement
     ;
 
 validStatement
-    : (createTable | alterTable | dropTable | truncateTable 
-    | insert | replace | update | delete | select | call
+    : (createTable | alterTable | dropTable | truncateTable | validDMLStatement
     | setVariable | beginStatement | declareStatement | flowControlStatement | 
cursorStatement | conditionHandlingStatement) SEMI_?
     ;
+    
+validDMLStatement

Review comment:
       > I suppose `validDMLStatement` is just for your convenience. If 
`MySQLVisitor` contains the content of `MySQLDMLStatement`, this rule is 
unneeded, right? As there is no such concept in the SQL grammar of MySQL, I 
guess.
   
   @tristaZero Yes, the `validDMLStatement` is simply a way to differentiate 
the statements in routine Body so that they can be processed during routine 
parsing. If `MySQLVisitor` contains the content of `MySQLDMLStatement`, this 
rule can be removed.




----------------------------------------------------------------
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:
[email protected]


Reply via email to