lwtdev edited a comment on issue #7548:
URL: https://github.com/apache/shardingsphere/issues/7548#issuecomment-696550564
> Hi @lwtdev
> Thanks for your detailed issue.
> Firstly, I also wonder how you created the `customer` table, which will
help position the problem.
> Secondly, I have to say this is a band example of defensive programming. 😞
Yes, This is not a good config example (and it was wrong...). it's was a
example simplify from config as follow(in 4.x):
```yaml
databaseStrategy:
inline:
shardingColumn: customer_id
algorithmExpression: ds_${String.format("%02d",new
BigDecimal(customer_id).abs().divideAndRemainder(4)[1].longValue().intdiv(2))}
tableStrategy:
inline:
shardingColumn: customer_id
algorithmExpression: customer_email_${String.format("%04d",new
BigDecimal(customer_id).abs().divideAndRemainder(4)[1].longValue())}
```
----------------------------------------------------------------
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]