You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Qianyi951015 (via GitHub)" <gi...@apache.org> on 2023/02/14 07:37:50 UTC
[GitHub] [shardingsphere] Qianyi951015 opened a new pull request, #24156: Add parser test for `defaultShardingStrategy` and `shardingRule`
Qianyi951015 opened a new pull request, #24156:
URL: https://github.com/apache/shardingsphere/pull/24156
Related to #24059 #24151 #24153.
Changes proposed in this pull request:
- Add parser test for `defaultShardingStrategy` and `shardingRule`
---
Before committing this PR, I'm sure that I have checked the following options:
- [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [x] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
--
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
[GitHub] [shardingsphere] codecov-commenter commented on pull request #24156: Add parser test for `defaultShardingStrategy` and `shardingRule`
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #24156:
URL: https://github.com/apache/shardingsphere/pull/24156#issuecomment-1429309558
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/24156?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#24156](https://codecov.io/gh/apache/shardingsphere/pull/24156?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (80063b4) into [master](https://codecov.io/gh/apache/shardingsphere/commit/d9176db27b2ee407b476e89c9ac84b115b0d63e2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d9176db) will **not change** coverage.
> The diff coverage is `n/a`.
> :exclamation: Current head 80063b4 differs from pull request most recent head 2bf89a8. Consider uploading reports for the commit 2bf89a8 to get more accurate results
```diff
@@ Coverage Diff @@
## master #24156 +/- ##
=========================================
Coverage 50.11% 50.11%
Complexity 1578 1578
=========================================
Files 3259 3259
Lines 53510 53510
Branches 9843 9843
=========================================
Hits 26819 26819
Misses 24333 24333
Partials 2358 2358
```
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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
[GitHub] [shardingsphere] Qianyi951015 commented on a diff in pull request #24156: Add parser test for `defaultShardingStrategy` and `shardingRule`
Posted by "Qianyi951015 (via GitHub)" <gi...@apache.org>.
Qianyi951015 commented on code in PR #24156:
URL: https://github.com/apache/shardingsphere/pull/24156#discussion_r1105479132
##########
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:
fixed
--
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
[GitHub] [shardingsphere] RaigorJiang merged pull request #24156: Add parser test for `defaultShardingStrategy` and `shardingRule`
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang merged PR #24156:
URL: https://github.com/apache/shardingsphere/pull/24156
--
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
[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #24156: Add parser test for `defaultShardingStrategy` and `shardingRule`
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #24156: Add parser test for `defaultShardingStrategy` and `shardingRule`
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
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