This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a commit to branch ignite-24675
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit e8a4516bef810641d5b8848234129730185bedcd
Author: amashenkov <[email protected]>
AuthorDate: Fri Feb 28 16:54:39 2025 +0300

    Fix HashJoin node failure for ANTI join
---
 .../org/apache/ignite/internal/sql/engine/exec/rel/HashJoinNode.java | 5 +----
 .../ignite/internal/sql/engine/exec/rel/HashJoinExecutionTest.java   | 3 ---
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git 
a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/rel/HashJoinNode.java
 
b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/rel/HashJoinNode.java
index 0e26a93e55c..b12165f22f6 100644
--- 
a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/rel/HashJoinNode.java
+++ 
b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/rel/HashJoinNode.java
@@ -578,6 +578,7 @@ public abstract class HashJoinNode<RowT> extends 
AbstractRightMaterializedJoinNo
                             }
                         }
 
+                        // Emit matched row.
                         if (anyMatched) {
                             requested--;
 
@@ -635,10 +636,6 @@ public abstract class HashJoinNode<RowT> extends 
AbstractRightMaterializedJoinNo
                             requested--;
 
                             downstream().push(left);
-
-                            if (requested == 0) {
-                                break;
-                            }
                         }
 
                         left = null;
diff --git 
a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/HashJoinExecutionTest.java
 
b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/HashJoinExecutionTest.java
index 6ea0c535c74..8de6ec7e288 100644
--- 
a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/HashJoinExecutionTest.java
+++ 
b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/rel/HashJoinExecutionTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.sql.engine.exec.rel;
 
 import static org.apache.calcite.rel.core.JoinRelType.ANTI;
-import static org.apache.calcite.rel.core.JoinRelType.FULL;
 import static org.apache.calcite.rel.core.JoinRelType.INNER;
 import static org.apache.calcite.rel.core.JoinRelType.RIGHT;
 import static org.apache.calcite.rel.core.JoinRelType.SEMI;
@@ -186,8 +185,6 @@ public class HashJoinExecutionTest extends 
AbstractJoinExecutionTest {
     @ParameterizedTest
     @EnumSource(JoinRelType.class)
     void checkHashJoinNodeWithDifferentBufferSize(JoinRelType joinType) {
-        Assumptions.assumeFalse(joinType == ANTI, "ANTI join type is buggy");
-
         validateDistinctData(executionContext(1), joinType, 0, 0);
         validateDistinctData(executionContext(1), joinType, 0, 1);
         validateDistinctData(executionContext(1), joinType, 0, 10);

Reply via email to