134130 commented on code in PR #27904:
URL: https://github.com/apache/shardingsphere/pull/27904#discussion_r1327934528


##########
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/InsertClauseShardingConditionEngine.java:
##########
@@ -100,7 +100,7 @@ private void appendMissingShardingConditions(final 
InsertStatementContext sqlSta
             return;
         }
         for (String each : allColumnNames) {
-            if (!columnNames.contains(each) && 
!shardingRule.isGenerateKeyColumn(each, tableName) && 
shardingRule.findShardingColumn(each, tableName).isPresent()) {
+            if (!columnNames.contains(each.toLowerCase()) && 
!shardingRule.isGenerateKeyColumn(each, tableName) && 
shardingRule.findShardingColumn(each, tableName).isPresent()) {

Review Comment:
   In my opinion, adapting column identifier to `lowercase` is not good choice. 
It looks just avoiding this issue.
   We need to fix `getColumnNamesForInsertColumns` returns it's own identifier, 
not `lowercase`.
   When just fixing with this way, it will be appeared on other case later.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to