setamv commented on a change in pull request #11254:
URL: https://github.com/apache/shardingsphere/pull/11254#discussion_r677924557



##########
File path: 
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
##########
@@ -176,7 +176,7 @@ private boolean isGettingShardingValuesFromHint(final 
ShardingStrategy shardingS
     private List<ShardingConditionValue> 
getShardingValuesFromShardingConditions(final ShardingRule shardingRule, final 
Collection<String> shardingColumns, final ShardingCondition shardingCondition) {
         List<ShardingConditionValue> result = new 
ArrayList<>(shardingColumns.size());
         for (ShardingConditionValue each : shardingCondition.getValues()) {
-            Optional<BindingTableRule> bindingTableRule = 
shardingRule.findBindingTableRule(logicTableName);
+            Optional<BindingTableRule> bindingTableRule = 
shardingRule.findBindingTableRule(each.getTableName().toLowerCase());

Review comment:
       the table names are uppercase in our schema,and we config the binding 
rules with table name in uppercase like `- T_XX_MAIN_004,T_XX_DETAIL_004_EXT`, 
but the table names in 
`org.apache.shardingsphere.sharding.rule.ShardingRule#bindingTableRules` are 
converted to lowercase.
   when we execute sql with table names in uppercase, the table name in 
ShardingConditionValue are kept in uppercase, so, i   must convert it's to 
lowercase the match the table name in sharding rule.




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