qinnnyul opened a new issue #2148: how to pass mapping logic into 
sharding-algorithm?
URL: https://github.com/apache/incubator-shardingsphere/issues/2148
 
 
   ## we would like to do table sharding by tenant id,  however, it is not good 
to split data by hash mod, it will be nicer if we can use the following mapping 
logic, e.g: {tenant1, tenant99, tenant101} ->  table_00, {other_tenant} -> 
table_01. 
   
   But we can not find a way to pass around this kind of mapping logic into 
XXShardingAlgorithm, as it only accept two parameters: 
   
   ```
    /**
        * Sharding.
        * 
        * @param availableTargetNames available data sources or tables's names
        * @param shardingValue sharding value
        * @return sharding result for data source or table's name
        */
   ```
   
   please advise what we can do to achieve this goal? thx

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to