happypleasure commented on issue #14335:
URL: 
https://github.com/apache/shardingsphere/issues/14335#issuecomment-1002134657


   The expression (“t_test_${def num = Math.abs(user_id.hashCode() % 10); 
return num > 9 ? num : '0' + num}” ) can not match sharding rule. 
   actualDataNodes: 
write_ds0.t_test_0${0..9},write_ds1.t_test_1${0..9},write_ds2.t_test_2${0..9},write_ds3.t_test_3${0..9},write_ds4.t_test_4${0..9},write_ds5.t_test_5${0..9},write_ds6.t_test_6${0..9},write_ds7.t_test_7${0..9},write_ds8.t_test_8${0..9},write_ds9.t_test_9${0..9}
   database table relation
   ```
   database  :   tables
   write_ds0  :  t_test_00,  t_test_01, ... t_test_09
   write_ds1  : t_test_10,  t_test_11, ... t_test_19
   write_ds6  : t_test_60,  t_test_61, ... t_test_69
   .                                                         .
   .                                                         .
   write_ds9  : t_test_90,  t_test_91, ... t_test_99
   ```
   if (user_id.hashCode() % 100) equal 66 ,  it should route to  database   
“write_ds6" table "t_test_66" 
   
   @zjcnb 
   


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