You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/09 00:34:53 UTC

[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #12295: fix mysql insert sql bug; sql convert to a tree, if assignment is ins…

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



##########
File path: shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContext.java
##########
@@ -44,14 +45,18 @@
     public InsertValueContext(final Collection<ExpressionSegment> assignments, final List<Object> parameters, final int parametersOffset) {
         parameterCount = calculateParameterCount(assignments);
         valueExpressions = getValueExpressions(assignments);
-        this.parameters = getParameters(parameters, parametersOffset);
+        this.parameters = getParameters(parameters, parshardingsphere-infra-binderametersOffset);

Review comment:
       @CodingBingo Why change `parametersOffset` to this name?

##########
File path: shardingsphere-infra/shardingsphere-infra-binder/src/main/java/org/apache/shardingsphere/infra/binder/segment/insert/values/InsertValueContext.java
##########
@@ -102,6 +107,10 @@ private int getParameterIndex(final ExpressionSegment valueExpression) {
             }
             if (each instanceof ParameterMarkerExpressionSegment) {
                 result++;
+            } else if (each instanceof BinaryOperationExpression) {

Review comment:
       @CodingBingo Can we extract this common logic?




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

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