codefairy08 commented on issue #1908: In query route  error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/1908#issuecomment-471486187
 
 
   @guowdxp it compute availableTargetDatabases using sharding condition, then 
use each availableTargetDatabases and sharding condition value compute actual 
table, it cause  datasource Cartesian with actual  table, when database 
sharding column is the same as table sharding column ,it execute  more actual 
sql, but the result is correct.  StandardRoutingEngine#routeDataSources method 
return a Map<String,List<RouteValue>>, key is datasource name, value is this 
datasource RouteValues
   , doSharding(availableTargetDatabases, databaseShardingValues) , split 
databaseShardingValues ,each databaseShardingValues with one 
element,StandardRoutingEngine#routeTables(final TableRule tableRule, final 
String routedDataSource, final List<RouteValue> tableShardingValues, 
Map<String,List<RouteValue>> datasourceRouteValues) ,when  database sharding 
column is the same as table sharding column,  use datasourceRouteValues compute 
actual tables
   

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


With regards,
Apache Git Services

Reply via email to