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 2021/12/23 06:27:22 UTC
[GitHub] [shardingsphere] RaigorJiang commented on issue #14242: Cannot use mod() on this number type: java.math.BigDecimal, it's should be fixed.
RaigorJiang commented on issue #14242:
URL: https://github.com/apache/shardingsphere/issues/14242#issuecomment-1000076444
Hi @GreekPanda
BigInteger cannot use the mod function, and you use a modular sharding algorithm, which is the cause of the exception.
ShardingSphere provides a general solution, but also provides the ability to expand. If you have a special scenario, you can choose to implement your own sharding algorithm and use the BigInteger type in the algorithm.
Here is an example of a custom algorithm:
https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org