DemonLms commented on a change in pull request #5985:
URL: https://github.com/apache/shardingsphere/pull/5985#discussion_r440787041



##########
File path: 
shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-rewrite/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/impl/EncryptInsertValuesTokenGenerator.java
##########
@@ -133,7 +133,8 @@ private void encryptToken(final InsertValue 
insertValueToken, final String table
     private void addPlainColumn(final InsertValue insertValueToken, final int 
columnIndex,
                                 final String tableName, final String 
columnName, final InsertValueContext insertValueContext, final Object 
originalValue) {
         if (getEncryptRule().findPlainColumn(tableName, 
columnName).isPresent()) {
-            DerivedSimpleExpressionSegment derivedExpressionSegment = 
insertValueContext.getParameters().isEmpty()
+            DerivedSimpleExpressionSegment derivedExpressionSegment = 
(insertValueContext.getParameters().isEmpty()
+                    || 
insertValueContext.getValueExpressions().get(columnIndex) instanceof 
LiteralExpressionSegment)

Review comment:
       Done.




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