You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/04/24 03:33:57 UTC
[GitHub] [incubator-shardingsphere] childewuque opened a new issue #2255:
May sharding-column supports both negative and positive number ?
childewuque opened a new issue #2255: May sharding-column supports both negative and positive number ?
URL: https://github.com/apache/incubator-shardingsphere/issues/2255
If unit_id may be a negative or positive number,when unit_id is a negative number,the table name may be l_unit_-1,but our table names are unit_id_0 and unit_id_1.
How can we config this case?
====yaml====
....
`tables:
l_unit:
actual-data-nodes: ms.l_unit_$->{0..1}
key-generator:
column: id
type: SNOWFLAKE
table-strategy:
inline:
sharding-column: unit_id
algorithm-expression: l_unit_$->{unit_id % 2}`
----------------------------------------------------------------
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
With regards,
Apache Git Services