strongduanmu edited a comment on issue #6996:
URL: https://github.com/apache/shardingsphere/issues/6996#issuecomment-678652691
> SELECT id,item_name,item_code,store_id,status FROM test_store_Item
WHERE (id IN (select id from test_store_Item where store_id = 1006) AND
store_id IN (?))
@liquanjin Hi, what is the type of parameter in `store_id IN (?)`?
The first parameter(`store_id=1006`) will be processed as int by default. If
the second parameter(`store_id IN (?)`) type is different, it will cause an
error in subquery check.
```java
private boolean isSameRouteValue(final ShardingRule shardingRule, final
ListRouteValue routeValue1, final ListRouteValue routeValue2) {
return isSameLogicTable(shardingRule, routeValue1, routeValue2) &&
routeValue1.getColumnName().equals(routeValue2.getColumnName()) &&
routeValue1.getValues().equals(routeValue2.getValues());
}
if (shardingConditions.getConditions().size() > 1) {
Preconditions.checkState(isSameShardingCondition(shardingRule,
shardingConditions), "Sharding value must same with subquery.");
}
```
----------------------------------------------------------------
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]