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 2021/08/16 03:56:05 UTC
[GitHub] [shardingsphere] lanchengx opened a new pull request #11838: Implement 'hint'
lanchengx opened a new pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838
Fixes #11677.
Changes proposed in this pull request:
- Implement 'hint';
- Add unit test;
--
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 #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on a change in pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#discussion_r689984163
##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/sharding/RALStatement.g4
##########
@@ -44,5 +44,5 @@ tableName
;
shardingValue
- : IDENTIFIER
+ : INT
Review comment:
After discussion, we think it may not only be int.
--
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] lanchengx commented on pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
lanchengx commented on pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#issuecomment-899302789
@tristaZero Hi, The local CI has been passed. Could you have a review for me ?
--
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] tristaZero merged pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838
--
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 #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#issuecomment-899227069
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11838?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 [#11838](https://codecov.io/gh/apache/shardingsphere/pull/11838?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e9c6edb) into [master](https://codecov.io/gh/apache/shardingsphere/commit/5c7afb08d738709e3cc1ebf4636ff27131a11b35?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5c7afb0) will **decrease** coverage by `0.05%`.
> The diff coverage is `40.90%`.
[](https://codecov.io/gh/apache/shardingsphere/pull/11838?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 #11838 +/- ##
============================================
- Coverage 63.43% 63.37% -0.06%
- Complexity 1203 1213 +10
============================================
Files 2319 2329 +10
Lines 34995 35072 +77
Branches 6077 6093 +16
============================================
+ Hits 22199 22227 +28
- Misses 11003 11051 +48
- Partials 1793 1794 +1
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/11838?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ore/ReadwriteSplittingDistSQLStatementVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy9zaGFyZGluZ3NwaGVyZS1yZWFkd3JpdGUtc3BsaXR0aW5nLWRpc3RzcWwvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy1kaXN0c3FsLXBhcnNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2Rpc3RzcWwvcGFyc2VyL2NvcmUvUmVhZHdyaXRlU3BsaXR0aW5nRGlzdFNRTFN0YXRlbWVudFZpc2l0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...l/parser/core/ShardingDistSQLStatementVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctZGlzdHNxbC9zaGFyZGluZ3NwaGVyZS1zaGFyZGluZy1kaXN0c3FsLXBhcnNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvZGlzdHNxbC9wYXJzZXIvY29yZS9TaGFyZGluZ0Rpc3RTUUxTdGF0ZW1lbnRWaXNpdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...executor/AddShardingHintDatabaseValueExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0FkZFNoYXJkaW5nSGludERhdGFiYXNlVmFsdWVFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...nt/executor/AddShardingHintTableValueExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0FkZFNoYXJkaW5nSGludFRhYmxlVmFsdWVFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ql/ral/common/hint/executor/ClearHintExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0NsZWFySGludEV4ZWN1dG9yLmphdmE=) | `0.00% <ø> (ø)` | |
| [...tor/ClearReadwriteSplittingHintSourceExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0NsZWFyUmVhZHdyaXRlU3BsaXR0aW5nSGludFNvdXJjZUV4ZWN1dG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../hint/executor/ClearShardingValueHintExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0NsZWFyU2hhcmRpbmdWYWx1ZUhpbnRFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...executor/SetShardingHintDatabaseValueExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL1NldFNoYXJkaW5nSGludERhdGFiYXNlVmFsdWVFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...utor/ShowReadwriteSplittingHintSourceExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL1Nob3dSZWFkd3JpdGVTcGxpdHRpbmdIaW50U291cmNlRXhlY3V0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [.../hint/executor/ShowShardingHintStatusExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL1Nob3dTaGFyZGluZ0hpbnRTdGF0dXNFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| ... and [36 more](https://codecov.io/gh/apache/shardingsphere/pull/11838/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11838?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/11838?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 [5c7afb0...e9c6edb](https://codecov.io/gh/apache/shardingsphere/pull/11838?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] lanchengx commented on a change in pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
lanchengx commented on a change in pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#discussion_r689646380
##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/sharding/RALStatement.g4
##########
@@ -44,5 +44,5 @@ tableName
;
shardingValue
- : IDENTIFIER
+ : INT
Review comment:
No. I confirmed with @RaigorJiang that this can only be a 'INT'.
--
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] lanchengx commented on a change in pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
lanchengx commented on a change in pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#discussion_r689437907
##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/core/ShardingDistSQLStatementVisitor.java
##########
@@ -128,6 +138,31 @@ public ASTNode visitDropShardingBindingTableRules(final DropShardingBindingTable
return new DropShardingBindingTableRulesStatement();
}
+ @Override
+ public ASTNode visitSetShardingHintDatabaseValue(final SetShardingHintDatabaseValueContext ctx) {
Review comment:
It is generated from a .g4 file, It's supposed to be a special naming rule.
--
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] tristaZero commented on a change in pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#discussion_r689581505
##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/antlr4/imports/sharding/RALStatement.g4
##########
@@ -44,5 +44,5 @@ tableName
;
shardingValue
- : IDENTIFIER
+ : INT
Review comment:
Could a shardingValue equal `aaa`?
##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/hint/executor/AddShardingHintDatabaseValueExecutor.java
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.proxy.backend.text.distsql.ral.common.hint.executor;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader;
+import org.apache.shardingsphere.proxy.backend.response.header.update.UpdateResponseHeader;
+import org.apache.shardingsphere.proxy.backend.text.sctl.hint.internal.HintManagerHolder;
+import org.apache.shardingsphere.sharding.distsql.parser.statement.hint.AddShardingHintDatabaseValueStatement;
+
+/**
+ * Add sharding hint database value executor.
+ */
+@RequiredArgsConstructor
+public final class AddShardingHintDatabaseValueExecutor extends AbstractHintUpdateExecutor<AddShardingHintDatabaseValueStatement> {
+
+ private final AddShardingHintDatabaseValueStatement sqlStatement;
+
+ @Override
+ public ResponseHeader execute() {
+ HintManagerHolder.get().addDatabaseShardingValue(sqlStatement.getLogicTableName(), sqlStatement.getShardingValue());
+ return new UpdateResponseHeader(null);
Review comment:
Could we consider replace `null` with `EmptyStatement`?
--
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] lanchengx commented on a change in pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
lanchengx commented on a change in pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#discussion_r689644834
##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/hint/executor/AddShardingHintDatabaseValueExecutor.java
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.proxy.backend.text.distsql.ral.common.hint.executor;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.shardingsphere.proxy.backend.response.header.ResponseHeader;
+import org.apache.shardingsphere.proxy.backend.response.header.update.UpdateResponseHeader;
+import org.apache.shardingsphere.proxy.backend.text.sctl.hint.internal.HintManagerHolder;
+import org.apache.shardingsphere.sharding.distsql.parser.statement.hint.AddShardingHintDatabaseValueStatement;
+
+/**
+ * Add sharding hint database value executor.
+ */
+@RequiredArgsConstructor
+public final class AddShardingHintDatabaseValueExecutor extends AbstractHintUpdateExecutor<AddShardingHintDatabaseValueStatement> {
+
+ private final AddShardingHintDatabaseValueStatement sqlStatement;
+
+ @Override
+ public ResponseHeader execute() {
+ HintManagerHolder.get().addDatabaseShardingValue(sqlStatement.getLogicTableName(), sqlStatement.getShardingValue());
+ return new UpdateResponseHeader(null);
Review comment:
Good idea, I will consider it.
I also think using ‘null’ is not good enough, but we all used ‘null’ before.
Should I replace all ‘null’?
--
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 edited a comment on pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#issuecomment-899227069
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11838?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 [#11838](https://codecov.io/gh/apache/shardingsphere/pull/11838?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6ba7e9e) into [master](https://codecov.io/gh/apache/shardingsphere/commit/5c7afb08d738709e3cc1ebf4636ff27131a11b35?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5c7afb0) will **decrease** coverage by `0.11%`.
> The diff coverage is `40.86%`.
[](https://codecov.io/gh/apache/shardingsphere/pull/11838?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 #11838 +/- ##
============================================
- Coverage 63.43% 63.32% -0.12%
- Complexity 1203 1212 +9
============================================
Files 2319 2325 +6
Lines 34995 35047 +52
Branches 6077 6096 +19
============================================
- Hits 22199 22193 -6
- Misses 11003 11063 +60
+ Partials 1793 1791 -2
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/11838?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ore/ReadwriteSplittingDistSQLStatementVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy9zaGFyZGluZ3NwaGVyZS1yZWFkd3JpdGUtc3BsaXR0aW5nLWRpc3RzcWwvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy1kaXN0c3FsLXBhcnNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2Rpc3RzcWwvcGFyc2VyL2NvcmUvUmVhZHdyaXRlU3BsaXR0aW5nRGlzdFNRTFN0YXRlbWVudFZpc2l0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...l/parser/core/ShardingDistSQLStatementVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctZGlzdHNxbC9zaGFyZGluZ3NwaGVyZS1zaGFyZGluZy1kaXN0c3FsLXBhcnNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvZGlzdHNxbC9wYXJzZXIvY29yZS9TaGFyZGluZ0Rpc3RTUUxTdGF0ZW1lbnRWaXNpdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...executor/AddShardingHintDatabaseValueExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0FkZFNoYXJkaW5nSGludERhdGFiYXNlVmFsdWVFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...nt/executor/AddShardingHintTableValueExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0FkZFNoYXJkaW5nSGludFRhYmxlVmFsdWVFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ql/ral/common/hint/executor/ClearHintExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0NsZWFySGludEV4ZWN1dG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../executor/ClearReadwriteSplittingHintExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0NsZWFyUmVhZHdyaXRlU3BsaXR0aW5nSGludEV4ZWN1dG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ommon/hint/executor/ClearShardingHintExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL0NsZWFyU2hhcmRpbmdIaW50RXhlY3V0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...nt/executor/SetReadwriteSplittingHintExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL1NldFJlYWR3cml0ZVNwbGl0dGluZ0hpbnRFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...executor/SetShardingHintDatabaseValueExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL1NldFNoYXJkaW5nSGludERhdGFiYXNlVmFsdWVFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...utor/ShowReadwriteSplittingHintStatusExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11838/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL1Nob3dSZWFkd3JpdGVTcGxpdHRpbmdIaW50U3RhdHVzRXhlY3V0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| ... and [59 more](https://codecov.io/gh/apache/shardingsphere/pull/11838/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11838?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/11838?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 [5c7afb0...6ba7e9e](https://codecov.io/gh/apache/shardingsphere/pull/11838?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] tristaZero commented on a change in pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#discussion_r690022690
##########
File path: shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/statement/distsql/ral/ShowShardingHintStatusStatementTestCase.java
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.ral;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;
+
+/**
+ * Show sharding hint status statement test case.
+ */
+@Getter
+@Setter
+public class ShowShardingHintStatusStatementTestCase extends SQLParserTestCase {
Review comment:
Is it possible to define it as a final class?
--
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] taojintianxia commented on a change in pull request #11838: Refactor 'hint' in SCTL
Posted by GitBox <gi...@apache.org>.
taojintianxia commented on a change in pull request #11838:
URL: https://github.com/apache/shardingsphere/pull/11838#discussion_r689431978
##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-parser/src/main/java/org/apache/shardingsphere/sharding/distsql/parser/core/ShardingDistSQLStatementVisitor.java
##########
@@ -128,6 +138,31 @@ public ASTNode visitDropShardingBindingTableRules(final DropShardingBindingTable
return new DropShardingBindingTableRulesStatement();
}
+ @Override
+ public ASTNode visitSetShardingHintDatabaseValue(final SetShardingHintDatabaseValueContext ctx) {
Review comment:
SetShardingHintDatabaseValueContext , use verb as the very biginning of a class name, is that a specific naming rule in this satuation ?
--
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