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/23 07:52:42 UTC

[GitHub] [incubator-shardingsphere] childewuque opened a new issue #2250: 分表的字段支持负数吗?

childewuque opened a new issue #2250: 分表的字段支持负数吗?
URL: https://github.com/apache/incubator-shardingsphere/issues/2250
 
 
   如果业务上unit_id是包含负数和正数,当unit_id是负数时,下面的配置,得到的表名可能是l_unit_-1,请问该如何正确配置呢? 
   
   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