RaigorJiang commented on code in PR #24156:
URL: https://github.com/apache/shardingsphere/pull/24156#discussion_r1105435905


##########
test/it/parser/src/main/resources/case/rdl/create.xml:
##########
@@ -615,6 +647,34 @@
             <key-generate-strategy algorithm-name="snowflake" />
         </rule>
     </create-sharding-table-rule>
+    
+    <create-sharding-table-rule 
sql-case-id="create-sharding-table-rule-with-complex-table-strategy-and-standard-database-strategy">
+        <rule name="t_order_item">
+            <data-node>ds_${0..1}.t_order_item_${0..1}</data-node>
+            <table-strategy type="complex" sharding-column="order_id">
+                <algorithm-segment algorithm-name="complex_inline">
+                    <property key="algorithm-expression" 
value="t_order_${user_id % 2}" />
+                </algorithm-segment>
+            </table-strategy>
+            <database-strategy type="standard" sharding-column="user_id">
+                <algorithm-segment algorithm-name="inline">
+                    <property key="algorithm-expression" 
value="t_order_${user_id % 2}" />

Review Comment:
   @Qianyi951015 FYI:
   ```sql
   CREATE SHARDING TABLE RULE t_order_item (
   DATANODES("ds.t_order_${0..1}_${0..1}"),
   
TABLE_STRATEGY(TYPE=COMPLEX,SHARDING_COLUMNS=user_id,order_id,SHARDING_ALGORITHM(TYPE(NAME=COMPLEX_INLINE,PROPERTIES("algorithm-expression"="t_order_${user_id
 % 2}_${order_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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to