tristaZero commented on a change in pull request #4916: add tableReferences in 
selectStatement
URL: 
https://github.com/apache/incubator-shardingsphere/pull/4916#discussion_r397597340
 
 

 ##########
 File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java
 ##########
 @@ -201,7 +204,11 @@ public ASTNode visitOnDuplicateKeyClause(final 
OnDuplicateKeyClauseContext ctx)
     @Override
     public ASTNode visitUpdate(final UpdateContext ctx) {
         UpdateStatement result = new UpdateStatement();
-        result.getTables().addAll(((CollectionValue<SimpleTableSegment>) 
visit(ctx.tableReferences())).getValue());
+        CollectionValue<TableReferenceSegment> tableReferences = 
(CollectionValue<TableReferenceSegment>) visit(ctx.tableReferences());
+        for (TableReferenceSegment t : tableReferences.getValue()) {
+            result.getTables().addAll(t.getTables());
+        }
+//        result.getTables().addAll(((CollectionValue<SimpleTableSegment>) 
visit(ctx.tableReferences())).getValue());
 
 Review comment:
   Why did not you comment on this sentence instead of deleting it?

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