Lucas-307 commented on issue #5957:
URL: https://github.com/apache/shardingsphere/issues/5957#issuecomment-643119338


   @taojintianxia hi, I find a easy way to do this.
   
   `f_user_id`  ->  `Long.parseLong(f_user_id)`
   
   ```yaml
   shardingRule:
     tables:
       test:
         actualDataNodes: ds_$->{0..1}.test
         databaseStrategy:
           inline:
             shardingColumn: f_user_id
             algorithmExpression: ds_${Long.parseLong(f_user_id) % 2} # 
transfer to long
         logicTable: test
   ```


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


Reply via email to