strongduanmu edited a comment on issue #6942:
URL: https://github.com/apache/shardingsphere/issues/6942#issuecomment-677740258


   @sandynz Thank you for the example, and I have reproduced this exception. 
The reason for this problem is that the value in the `on duplicate key 
statement` is parsed twice, therefore the `parametersCount` is greater than the 
actual value by 1. 
   
   ```java
   @Override
   public ASTNode visitOnDuplicateKeyClause(final OnDuplicateKeyClauseContext 
ctx) {
       Collection<AssignmentSegment> columns = new LinkedList<>();
       for (AssignmentContext each : ctx.assignment()) {
           columns.add((AssignmentSegment) visit(each));
           visit(each.assignmentValue());
       }
       return new OnDuplicateKeyColumnsSegment(ctx.getStart().getStartIndex(), 
ctx.getStop().getStopIndex(), columns);
   }
   ```
   
   I will fix this problem as soon as possible.
   


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