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 2020/12/09 06:53:40 UTC

[GitHub] [shardingsphere] huanghao495430759 opened a new pull request #8543: Fix#8238

huanghao495430759 opened a new pull request #8543:
URL: https://github.com/apache/shardingsphere/pull/8543


   Fixes #8238.
   
   add test case for SQLStatementCacheLoaderTest and ParseTreeCacheLoaderTest.
   


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] tristaZero merged pull request #8543: Fix#8238

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


   


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] codecov-io commented on pull request #8543: Fix#8238

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8543?src=pr&el=h1) Report
   > Merging [#8543](https://codecov.io/gh/apache/shardingsphere/pull/8543?src=pr&el=desc) (d967221) into [master](https://codecov.io/gh/apache/shardingsphere/commit/2b9db78152fcc5a2ab8a9669fb0f1efff00e4e2b?el=desc) (2b9db78) will **decrease** coverage by `0.08%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/8543/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/8543?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8543      +/-   ##
   ============================================
   - Coverage     72.30%   72.22%   -0.09%     
     Complexity      602      602              
   ============================================
     Files          1543     1545       +2     
     Lines         24494    24529      +35     
     Branches       4317     4325       +8     
   ============================================
   + Hits          17711    17715       +4     
   - Misses         5631     5656      +25     
   - Partials       1152     1158       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/8543?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...scaling/core/execute/engine/TaskExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9leGVjdXRlL2VuZ2luZS9UYXNrRXhlY3V0ZUVuZ2luZS5qYXZh) | `88.88% <0.00%> (-11.12%)` | `0.00% <0.00%> (ø%)` | |
   | [...t/metadata/schema/SchemaBackendHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L21ldGFkYXRhL3NjaGVtYS9TY2hlbWFCYWNrZW5kSGFuZGxlckZhY3RvcnkuamF2YQ==) | `91.66% <0.00%> (-8.34%)` | `0.00% <0.00%> (ø%)` | |
   | [...re/scaling/core/schedule/ScalingTaskScheduler.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9zY2hlZHVsZS9TY2FsaW5nVGFza1NjaGVkdWxlci5qYXZh) | `74.54% <0.00%> (-7.28%)` | `0.00% <0.00%> (ø%)` | |
   | [...scaling/core/job/task/inventory/InventoryTask.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbnZlbnRvcnkvSW52ZW50b3J5VGFzay5qYXZh) | `71.11% <0.00%> (-6.67%)` | `0.00% <0.00%> (ø%)` | |
   | [...hardingsphere/infra/lock/StandardLockStrategy.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9sb2NrL1N0YW5kYXJkTG9ja1N0cmF0ZWd5LmphdmE=) | `76.92% <0.00%> (-3.08%)` | `0.00% <0.00%> (ø%)` | |
   | [...ore/statement/ShardingSpherePreparedStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtamRiYy9zaGFyZGluZ3NwaGVyZS1qZGJjLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RyaXZlci9qZGJjL2NvcmUvc3RhdGVtZW50L1NoYXJkaW5nU3BoZXJlUHJlcGFyZWRTdGF0ZW1lbnQuamF2YQ==) | `73.86% <0.00%> (-1.14%)` | `1.00% <0.00%> (ø%)` | |
   | [...r/jdbc/core/statement/ShardingSphereStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtamRiYy9zaGFyZGluZ3NwaGVyZS1qZGJjLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RyaXZlci9qZGJjL2NvcmUvc3RhdGVtZW50L1NoYXJkaW5nU3BoZXJlU3RhdGVtZW50LmphdmE=) | `58.11% <0.00%> (-0.65%)` | `1.00% <0.00%> (ø%)` | |
   | [.../apache/shardingsphere/infra/lock/LockContext.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9sb2NrL0xvY2tDb250ZXh0LmphdmE=) | `82.35% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...ingsphere/agent/core/plugin/AgentPluginLoader.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vQWdlbnRQbHVnaW5Mb2FkZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...ngsphere/infra/context/kernel/KernelProcessor.java](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29udGV4dC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvY29udGV4dC9rZXJuZWwvS2VybmVsUHJvY2Vzc29yLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | ... and [14 more](https://codecov.io/gh/apache/shardingsphere/pull/8543/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8543?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8543?src=pr&el=footer). Last update [2b9db78...d967221](https://codecov.io/gh/apache/shardingsphere/pull/8543?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #8543: Fix#8238

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



##########
File path: shardingsphere-infra/shardingsphere-infra-parser/src/test/java/org/apache/shardingsphere/infra/parser/cache/SQLStatementCacheLoaderTest.java
##########
@@ -0,0 +1,46 @@
+/*
+ * 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.infra.parser.cache;
+
+import lombok.SneakyThrows;
+import org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.lang.reflect.Field;
+
+import static org.hamcrest.CoreMatchers.isA;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+
+public final class SQLStatementCacheLoaderTest {
+    private static final String SQL = "select * from user where id=1";

Review comment:
       Hi @huanghao495430759 ,
   
   Thanks for your contribution.
   It is preferable to add a blank line above this line to keep the same style to `ParseTreeCacheLoaderTest `.




----------------------------------------------------------------
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.

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