strongduanmu commented on code in PR #17756:
URL: https://github.com/apache/shardingsphere/pull/17756#discussion_r877204915


##########
shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/extractor/TableExtractor.java:
##########
@@ -217,11 +219,25 @@ public void extractTablesFromInsert(final InsertStatement 
insertStatement) {
                 extractTablesFromExpression(each);
             }
         }
+        
InsertStatementHandler.getOnDuplicateKeyColumnsSegment(insertStatement).ifPresent(each
 -> extractTablesFromAssignmentItems(each.getColumns()));
         if (insertStatement.getInsertSelect().isPresent()) {
             
extractTablesFromSelect(insertStatement.getInsertSelect().get().getSelect());
         }
     }
     
+    private void extractTablesFromAssignmentItems(final 
Collection<AssignmentSegment> assignmentItems) {
+        assignmentItems.stream().forEach(each -> 
extractTablesFromColumnSegments(each.getColumns()));

Review Comment:
   Please remove stream api here, it has performance lost.



-- 
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-unsubscr...@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to