You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "794086163 (via GitHub)" <gi...@apache.org> on 2023/03/16 07:36:21 UTC

[GitHub] [shardingsphere] 794086163 opened a new pull request, #24647: 24439

794086163 opened a new pull request, #24647:
URL: https://github.com/apache/shardingsphere/pull/24647

   Fixes #24439.
   
   Changes proposed in this pull request:
     -
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] 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] 794086163 closed pull request #24647: Fix java.lang.OutOfMemoryError: GC overhead limit exceeded

Posted by "794086163 (via GitHub)" <gi...@apache.org>.
794086163 closed pull request #24647: Fix java.lang.OutOfMemoryError: GC overhead limit exceeded
URL: https://github.com/apache/shardingsphere/pull/24647


-- 
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] 794086163 commented on pull request #24647: 24439

Posted by "794086163 (via GitHub)" <gi...@apache.org>.
794086163 commented on PR #24647:
URL: https://github.com/apache/shardingsphere/pull/24647#issuecomment-1475469445

   > 嗨@794086163,您可以修改 pr 标题以方便搜索吗?
   
   ok


-- 
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] strongduanmu commented on a diff in pull request #24647: 24439

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #24647:
URL: https://github.com/apache/shardingsphere/pull/24647#discussion_r1141264117


##########
sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/ColumnExtractor.java:
##########
@@ -69,7 +70,8 @@ public static Collection<ColumnSegment> extract(final ExpressionSegment expressi
      */
     public static void extractColumnSegments(final Collection<ColumnSegment> columnSegments, final Collection<WhereSegment> whereSegments) {
         for (WhereSegment each : whereSegments) {
-            for (AndPredicate andPredicate : ExpressionExtractUtil.getAndPredicates(each.getExpr())) {
+            final Collection<AndPredicate> result = new CopyOnWriteArraySet<>();

Review Comment:
   Please remove final for local param.



##########
sql-parser/statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/util/ExpressionExtractUtilTest.java:
##########
@@ -58,12 +59,23 @@ public void assertExtractAndPredicatesAndCondition() {
         ExpressionSegment rightExpressionSegment = new BinaryOperationExpression(28, 39, columnSegment2, parameterMarkerExpressionSegment2, "=", "status=?");
         BinaryOperationExpression expression = new BinaryOperationExpression(28, 54, leftExpressionSegment, rightExpressionSegment, "AND", "order_id=? AND status=?");
         Collection<AndPredicate> actual = ExpressionExtractUtil.getAndPredicates(expression);
+        
         assertThat(actual.size(), is(1));
         AndPredicate andPredicate = actual.iterator().next();
         assertThat(andPredicate.getPredicates().size(), is(2));
         Iterator<ExpressionSegment> iterator = andPredicate.getPredicates().iterator();
         assertThat(iterator.next(), is(leftExpressionSegment));
         assertThat(iterator.next(), is(rightExpressionSegment));
+        
+        Collection<AndPredicate> result = new LinkedList<>();
+        Collection<AndPredicate> actual2 = ExpressionExtractUtil.getAndPredicates(result, expression);
+        assertThat(actual2.size(), is(1));
+        AndPredicate andPredicate2 = actual2.iterator().next();
+        assertThat(andPredicate2.getPredicates().size(), is(2));
+        Iterator<ExpressionSegment> iterator2 = andPredicate.getPredicates().iterator();
+        assertThat(iterator2.next(), is(leftExpressionSegment));
+        assertThat(iterator2.next(), is(rightExpressionSegment));
+        

Review Comment:
   Please remove useless blank line.



##########
sql-parser/statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/util/ExpressionExtractUtilTest.java:
##########
@@ -58,12 +59,23 @@ public void assertExtractAndPredicatesAndCondition() {
         ExpressionSegment rightExpressionSegment = new BinaryOperationExpression(28, 39, columnSegment2, parameterMarkerExpressionSegment2, "=", "status=?");
         BinaryOperationExpression expression = new BinaryOperationExpression(28, 54, leftExpressionSegment, rightExpressionSegment, "AND", "order_id=? AND status=?");
         Collection<AndPredicate> actual = ExpressionExtractUtil.getAndPredicates(expression);
+        
         assertThat(actual.size(), is(1));
         AndPredicate andPredicate = actual.iterator().next();
         assertThat(andPredicate.getPredicates().size(), is(2));
         Iterator<ExpressionSegment> iterator = andPredicate.getPredicates().iterator();
         assertThat(iterator.next(), is(leftExpressionSegment));
         assertThat(iterator.next(), is(rightExpressionSegment));
+        

Review Comment:
   Please remove useless blank line.



##########
sql-parser/statement/src/test/java/org/apache/shardingsphere/sql/parser/sql/common/util/ExpressionExtractUtilTest.java:
##########
@@ -58,12 +59,23 @@ public void assertExtractAndPredicatesAndCondition() {
         ExpressionSegment rightExpressionSegment = new BinaryOperationExpression(28, 39, columnSegment2, parameterMarkerExpressionSegment2, "=", "status=?");
         BinaryOperationExpression expression = new BinaryOperationExpression(28, 54, leftExpressionSegment, rightExpressionSegment, "AND", "order_id=? AND status=?");
         Collection<AndPredicate> actual = ExpressionExtractUtil.getAndPredicates(expression);
+        

Review Comment:
   Please remove useless blank line.



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