You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/11/19 05:44:08 UTC

[GitHub] [shardingsphere] kimmking commented on issue #8211: Can sharding key be varchar ?

kimmking commented on issue #8211:
URL: https://github.com/apache/shardingsphere/issues/8211#issuecomment-730143824


   inline algorithmExpression is a groovy script, you can use any type such as int or string and whatever.
   
   as your case `ds_${ecif_cust_no % 2}` ,   ` % 2 `  only for int or long.
   
   you can use `Math.abs(ecif_cust_no.hashCode()) % 2` instead.


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