lmhmhl commented on issue #9152:
URL: https://github.com/apache/shardingsphere/issues/9152#issuecomment-768834533


   Hi @tristaZero.
   Honestly, I don't know how to configure the yml file, specifically, I don't 
know how to combine the sharding rule, and encrypt rule in one table.  It seems 
that It doesn't work like following code snippet , and I look up all the 
examples, and there are no yml file consist of the combination of sharding rule 
and encrypt rule, so I am wondering what does the yml file should looks like, 
can you give me some hints? By the way, I have read the doc of SS carefully, 
and found that It may not support mix sharding rule and encrypt rule, is this a 
new feature of SS?
   
   <img width="890" alt="Screen Shot 2021-01-28 at 2 34 11 PM" 
src="https://user-images.githubusercontent.com/24718258/106099699-11f16500-6176-11eb-9322-6b7f86fb850c.png";>
   
   ```
   rules:
   - !SHARDING
     tables:
       t_order_item_calcite_sharding:
         actualDataNodes: calcite_ds.t_order_item_calcite_sharding_${0..1}
         tableStrategy:
           standard:
             shardingColumn: item_id
             shardingAlgorithmName: table_inline
   - !ENCRYPT, !SHARDING
     encryptors:
       test:
         type: test
     tables:
       t_user_encrypt_calcite:
         columns:
           pwd:
             plainColumn: plain_pwd
             cipherColumn: cipher_pwd
             assistedQueryColumn: assist_pwd
             encryptorName: test
       t_user_encrypt_calcite_sharding:
         columns:
           pwd:
             plainColumn: plain_pwd
             cipherColumn: cipher_pwd
             assistedQueryColumn: assist_pwd
             encryptorName: test
         actualDataNodes: calcite_ds.t_user_encrypt_calcite_sharding_${0..1}
         tableStrategy:
           shardingStrategy:
             standard:
               shardingColumn: id
               shardingAlgorithmName: mod
     shardingAlgorithms:
       table_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_item_calcite_sharding_${item_id % 2}
       mod:
         type: MOD
         props:
           sharding-count: 2
   
   - !REPLICA_QUERY
     dataSources:
       calcite_ds:
         name: calcite_ds
         primaryDataSourceName: calcite_jdbc_1
         replicaDataSourceNames: calcite_jdbc_2
         loadBalancerName: roundRobin
     loadBalancers:
       roundRobin:
         type: ROUND_ROBIN
   
   props:
     sql-show: true
     query-with-cipher-column: true
   ```


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


Reply via email to