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/22 15:18:15 UTC

[GitHub] [shardingsphere] fwhdzh opened a new pull request #11944: Issue10968

fwhdzh opened a new pull request #11944:
URL: https://github.com/apache/shardingsphere/pull/11944


   For #10968.
   
   Changes proposed in this pull request:
   -Add test code of ShardingPaginationParameterRewriter and GeneratedKeyAssignmentTokenGenerator.
   -Move ShardingGeneratedKeyInsertValueParameterRewriterTest from *.rewrite to *.rewrite.parameter.
   


-- 
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] menghaoranss commented on a change in pull request #11944: Issue10968

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on a change in pull request #11944:
URL: https://github.com/apache/shardingsphere/pull/11944#discussion_r693616332



##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/GeneratedKeyAssignmentTokenGeneratorTest.java
##########
@@ -0,0 +1,69 @@
+/*
+ * 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.sharding.rewrite.token;
+
+import org.apache.shardingsphere.infra.binder.segment.insert.keygen.GeneratedKeyContext;
+import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext;
+import org.apache.shardingsphere.sharding.rewrite.token.generator.impl.keygen.GeneratedKeyAssignmentTokenGenerator;
+import org.apache.shardingsphere.sharding.rewrite.token.pojo.LiteralGeneratedKeyAssignmentToken;
+import org.apache.shardingsphere.sharding.rewrite.token.pojo.ParameterMarkerGeneratedKeyAssignmentToken;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.SetAssignmentSegment;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLInsertStatement;
+import org.junit.Test;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Optional;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class GeneratedKeyAssignmentTokenGeneratorTest {

Review comment:
       final




-- 
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] menghaoranss merged pull request #11944: Issue10968

Posted by GitBox <gi...@apache.org>.
menghaoranss merged pull request #11944:
URL: https://github.com/apache/shardingsphere/pull/11944


   


-- 
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 #11944: Issue10968

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #11944:
URL: https://github.com/apache/shardingsphere/pull/11944#issuecomment-903289656


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11944?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 [#11944](https://codecov.io/gh/apache/shardingsphere/pull/11944?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (87509cb) into [master](https://codecov.io/gh/apache/shardingsphere/commit/70f8fc75d8e43961eb8de6ffd591194462be75e7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (70f8fc7) will **decrease** coverage by `0.11%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/11944/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/11944?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   #11944      +/-   ##
   ============================================
   - Coverage     63.23%   63.11%   -0.12%     
   - Complexity     1230     1235       +5     
   ============================================
     Files          2327     2293      -34     
     Lines         35176    34865     -311     
     Branches       6129     6062      -67     
   ============================================
   - Hits          22242    22005     -237     
   + Misses        11136    11080      -56     
   + Partials       1798     1780      -18     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/11944?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...jdbc/core/datasource/ShardingSphereDataSource.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtamRiYy9zaGFyZGluZ3NwaGVyZS1qZGJjLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RyaXZlci9qZGJjL2NvcmUvZGF0YXNvdXJjZS9TaGFyZGluZ1NwaGVyZURhdGFTb3VyY2UuamF2YQ==) | `64.70% <0.00%> (-25.30%)` | :arrow_down: |
   | [...pository/zookeeper/CuratorZookeeperRepository.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLXJlcG9zaXRvcnkvc2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS1yZXBvc2l0b3J5LXByb3ZpZGVyL3NoYXJkaW5nc3BoZXJlLWdvdmVybmFuY2UtcmVwb3NpdG9yeS16b29rZWVwZXItY3VyYXRvci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZ292ZXJuYW5jZS9yZXBvc2l0b3J5L3pvb2tlZXBlci9DdXJhdG9yWm9va2VlcGVyUmVwb3NpdG9yeS5qYXZh) | `40.74% <0.00%> (-13.74%)` | :arrow_down: |
   | [.../text/admin/mysql/executor/ShowTablesExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2FkbWluL215c3FsL2V4ZWN1dG9yL1Nob3dUYWJsZXNFeGVjdXRvci5qYXZh) | `50.00% <0.00%> (-13.64%)` | :arrow_down: |
   | [...ommunication/jdbc/connection/ConnectionStatus.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jb21tdW5pY2F0aW9uL2pkYmMvY29ubmVjdGlvbi9Db25uZWN0aW9uU3RhdHVzLmphdmE=) | `90.90% <0.00%> (-9.10%)` | :arrow_down: |
   | [...ere/infra/metadata/schema/model/TableMetaData.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9zY2hlbWEvbW9kZWwvVGFibGVNZXRhRGF0YS5qYXZh) | `90.32% <0.00%> (-6.46%)` | :arrow_down: |
   | [...ing/core/api/impl/GovernanceRepositoryAPIImpl.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9hcGkvaW1wbC9Hb3Zlcm5hbmNlUmVwb3NpdG9yeUFQSUltcGwuamF2YQ==) | `93.75% <0.00%> (-6.25%)` | :arrow_down: |
   | [...mespace/parser/DataSourceBeanDefinitionParser.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtamRiYy9zaGFyZGluZ3NwaGVyZS1qZGJjLXNwcmluZy9zaGFyZGluZ3NwaGVyZS1qZGJjLWNvcmUtc3ByaW5nL3NoYXJkaW5nc3BoZXJlLWpkYmMtY29yZS1zcHJpbmctbmFtZXNwYWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zcHJpbmcvbmFtZXNwYWNlL3BhcnNlci9EYXRhU291cmNlQmVhbkRlZmluaXRpb25QYXJzZXIuamF2YQ==) | `92.50% <0.00%> (-4.06%)` | :arrow_down: |
   | [...r/segment/select/pagination/PaginationContext.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc2VnbWVudC9zZWxlY3QvcGFnaW5hdGlvbi9QYWdpbmF0aW9uQ29udGV4dC5qYXZh) | `75.00% <0.00%> (-3.58%)` | :arrow_down: |
   | [...phere/infra/context/metadata/MetaDataContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29udGV4dC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvY29udGV4dC9tZXRhZGF0YS9NZXRhRGF0YUNvbnRleHRzLmphdmE=) | `73.33% <0.00%> (-3.14%)` | :arrow_down: |
   | [...dingsphere/sql/parser/sql/common/util/SQLUtil.java](https://codecov.io/gh/apache/shardingsphere/pull/11944/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3V0aWwvU1FMVXRpbC5qYXZh) | `26.08% <0.00%> (-2.95%)` | :arrow_down: |
   | ... and [177 more](https://codecov.io/gh/apache/shardingsphere/pull/11944/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/11944?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/11944?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 [70f8fc7...87509cb](https://codecov.io/gh/apache/shardingsphere/pull/11944?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