You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/02/10 10:11:31 UTC
[GitHub] [shardingsphere] lanchengx opened a new pull request #15339: [DistSQL] Support `Unlabel instance` syntax.
lanchengx opened a new pull request #15339:
URL: https://github.com/apache/shardingsphere/pull/15339
For https://github.com/apache/shardingsphere/issues/15018.
Changes proposed in this pull request:
- Support `Unlabel instance` syntax.
<img width="603" alt="image" src="https://user-images.githubusercontent.com/52209337/153385320-7401e6e4-4a9f-4bcb-85e7-39d05de69bbf.png">
--
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 #15339: [DistSQL] Support `Unlabel instance` syntax.
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #15339:
URL: https://github.com/apache/shardingsphere/pull/15339#issuecomment-1035904934
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15339?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 [#15339](https://codecov.io/gh/apache/shardingsphere/pull/15339?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b6d6f5c) into [master](https://codecov.io/gh/apache/shardingsphere/commit/375361cef4fdc1c03b7744765d823c2390abdf90?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (375361c) will **decrease** coverage by `0.03%`.
> The diff coverage is `0.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/15339/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/15339?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #15339 +/- ##
============================================
- Coverage 60.21% 60.18% -0.04%
Complexity 1944 1944
============================================
Files 3207 3208 +1
Lines 48004 48027 +23
Branches 8148 8153 +5
============================================
- Hits 28907 28904 -3
- Misses 16765 16791 +26
Partials 2332 2332
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/15339?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ser/core/common/CommonDistSQLStatementVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/15339/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZGlzdHNxbC9zaGFyZGluZ3NwaGVyZS1kaXN0c3FsLXBhcnNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGlzdHNxbC9wYXJzZXIvY29yZS9jb21tb24vQ29tbW9uRGlzdFNRTFN0YXRlbWVudFZpc2l0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...ata/persist/service/ComputeNodePersistService.java](https://codecov.io/gh/apache/shardingsphere/pull/15339/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL21vZGUvbWV0YWRhdGEvcGVyc2lzdC9zZXJ2aWNlL0NvbXB1dGVOb2RlUGVyc2lzdFNlcnZpY2UuamF2YQ==) | `54.54% <0.00%> (-4.00%)` | :arrow_down: |
| [...ql/ral/common/set/SetStatementExecutorFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/15339/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9zZXQvU2V0U3RhdGVtZW50RXhlY3V0b3JGYWN0b3J5LmphdmE=) | `41.66% <0.00%> (-8.34%)` | :arrow_down: |
| [...al/common/set/excutor/UnlabelInstanceExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/15339/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9zZXQvZXhjdXRvci9VbmxhYmVsSW5zdGFuY2VFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/15339/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15339?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15339?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [375361c...b6d6f5c](https://codecov.io/gh/apache/shardingsphere/pull/15339?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] RaigorJiang commented on a change in pull request #15339: [DistSQL] Support `Unlabel instance` syntax.
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on a change in pull request #15339:
URL: https://github.com/apache/shardingsphere/pull/15339#discussion_r804426532
##########
File path: shardingsphere-distsql/shardingsphere-distsql-parser/src/main/java/org/apache/shardingsphere/distsql/parser/core/common/CommonDistSQLStatementVisitor.java
##########
@@ -195,6 +197,21 @@ public ASTNode visitLabelInstance(final LabelInstanceContext ctx) {
return new LabelInstanceStatement(ctx.RELABEL() != null, ip, port, labels);
}
+ @Override
+ public ASTNode visitUnlabelInstance(final UnlabelInstanceContext ctx) {
+ String ip;
+ String port;
+ if (null != ctx.instanceDefination()) {
+ ip = getIdentifierValue(ctx.instanceDefination().ip());
+ port = getIdentifierValue(ctx.instanceDefination().port());
+ } else {
+ ip = getIdentifierValue(ctx.instanceId().ip());
+ port = getIdentifierValue(ctx.instanceId().port());
+ }
+ LinkedList<String> labels = ctx.label().stream().map(this::getIdentifierValue).collect(Collectors.toCollection(LinkedList::new));
Review comment:
Can `LinkedList<String>` be replaced by `Collection<String>` ?
--
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 #15339: [DistSQL] Support `Unlabel instance` syntax.
Posted by GitBox <gi...@apache.org>.
RaigorJiang merged pull request #15339:
URL: https://github.com/apache/shardingsphere/pull/15339
--
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