You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "RaigorJiang (via GitHub)" <gi...@apache.org> on 2023/02/14 08:08:45 UTC

[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #24156: Add parser test for `defaultShardingStrategy` and `shardingRule`

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


##########
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:
   The algorithm-expression does not reflect the characteristics of complex



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org