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

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 50855f01c75 [fix](nereids) when runtimefilter target is null, skip the 
rf #34358
50855f01c75 is described below

commit 50855f01c75f830cee31163ece1c14def679bfe0
Author: minghong <engle...@gmail.com>
AuthorDate: Tue Apr 30 18:48:50 2024 +0800

    [fix](nereids) when runtimefilter target is null, skip the rf #34358
---
 .../doris/nereids/trees/plans/physical/PhysicalHashJoin.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashJoin.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashJoin.java
index d1a554820f7..e2472db87c3 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashJoin.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHashJoin.java
@@ -251,8 +251,16 @@ public class PhysicalHashJoin<
         Pair<PhysicalRelation, Slot> srcPair = 
ctx.getAliasTransferMap().get(srcExpr);
         PhysicalRelation srcNode = (srcPair == null) ? null : srcPair.first;
         Pair<PhysicalRelation, Slot> targetPair = 
ctx.getAliasTransferMap().get(probeExpr);
-        // when probeExpr is output slot of setOperator, targetPair is null
-        PhysicalRelation target1 = (targetPair == null) ? null : 
targetPair.first;
+        if (targetPair == null) {
+            /* cases for "targetPair is null"
+             1. when probeExpr is output slot of setOperator, targetPair is 
null
+             2. join (topn(table1), table2)
+                when aliasTransferMap goes through topn, all slots from table1
+                are cleared to avoid generate rf(table2->table1)
+            */
+            return false;
+        }
+        PhysicalRelation target1 = targetPair.first;
         PhysicalRelation target2 = null;
         if (ConnectContext.get() != null && 
ConnectContext.get().getSessionVariable().expandRuntimeFilterByInnerJoin) {
             if (!this.equals(builderNode)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to