Copilot commented on code in PR #13455:
URL: https://github.com/apache/ignite/pull/13455#discussion_r3743728548
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/CorrelatesIntegrationTest.java:
##########
@@ -90,19 +96,24 @@ public void testCorrelatesCollision() {
sql("INSERT INTO test1 VALUES (11, 1), (12, 2), (13, 3)");
sql("INSERT INTO test2 VALUES (11, 1), (12, 1), (13, 4)");
- // Collision by correlate variables in the left hand.
- assertQuery("SELECT * FROM test1 WHERE " +
- "EXISTS(SELECT * FROM test2 WHERE test1.a=test2.a AND
test1.b<>test2.c) " +
- "AND NOT EXISTS(SELECT * FROM test2 WHERE test1.a=test2.a AND
test1.b<test2.c)")
- .returns(12, 2)
- .check();
+ for (HintDefinition noHint : List.of(NO_NL_JOIN, NO_CNL_JOIN,
NO_HASH_JOIN)) {
+ if (noHint.toString().toUpperCase().startsWith("NO_")) {
+ System.out.println(">>> Check with: " + noHint);
+ // Collision by correlate variables in the left hand.
+ assertQuery("SELECT /*+ %s */ * FROM test1 WHERE
".formatted(noHint) +
Review Comment:
Test adds console output and an extra conditional that is always true for
the provided hint constants, which can make CI logs noisy and the test harder
to read. Consider removing the println and the redundant NO_* check and just
iterate over the hint list directly.
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/MergeJoinNode.java:
##########
@@ -414,8 +392,12 @@ else if (cmp > 0) {
inLoop = false;
}
- if (requested > 0 && (leftFinished() || rightFinished(true)) &&
checkJoinFinished())
+ if (requested > 0 && (leftFinished() || rightFinished(true))) {
+ requested = 0;
+ downstream().end();
+
return;
Review Comment:
This termination path now unconditionally calls downstream().end() when one
input is drained. That conflicts with the class-level contract for distributed
joins (MergeJoinNode#distributed javadoc: must not end downstream until both
inputs are completed to avoid exchange inbox reopen/memory leak). Consider
restoring the previous ‘finishing/drain’ logic (e.g., checkJoinFinished) so
distributed joins keep draining both inputs before ending downstream.
This issue also appears in the following locations of the same file:
- line 553
- line 723
- line 932
- line 992
- line 1055
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]