fantacy2001 opened a new issue #4861: two tables left join with different 
routing rules are not supported
URL: https://github.com/apache/incubator-shardingsphere/issues/4861
 
 
   two tables left join,  with different routing rules are not config binding 
tables, Will lead to full routing。
   Table a and table b are divided into tables according to col field. Table b 
is divided into tables according to col field on each sharding database. Table 
a is not divided into tables. The sharding database route can be found, but 
sharding table rule of table b will not be found,Cause table b full routing
   like this 
   select a.*,b.* from a left join b on a.col = b.col where a.col = '123'
   
   sharding rule:
   <sharding:table-rule logic-table="a" actual-data-nodes="ds_ms$->{0..1}.a" 
database-strategy-ref="databaseStrategy"  />
   <sharding:table-rule logic-table="b" 
actual-data-nodes="ds_ms0.b_000,ds_ms$->{0..1}.b_00$->{1..3}" 
database-strategy-ref="databaseStrategy"   table-strategy-ref="tableStrategy" />
   
       <sharding:standard-strategy id="databaseStrategy" sharding-column="col" 
precise-algorithm-ref="commonDBShardingAlgorithm"/>
   
       <sharding:standard-strategy id="tableStrategy" sharding-column="col" 
precise-algorithm-ref="tableShardingAlgorithm"/>
   actual sql:
   select a.*,b.* from db0.a left join db0.b_001 on a.col = b.col where a.col = 
'123';
   select a.*,b.* from db0.a left join db0.b_002 on a.col = b.col where a.col = 
'123';
   select a.*,b.* from db0.a left join db0.b_003 on a.col = b.col where a.col = 
'123';
   
   How to deal with this situation?
   
   version: 4.0.0 release

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to