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

englefly pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 0742e9e5657 [opt](nereids) if stats for any side of join children is 
null, do not prune runtime filter (#50298)
0742e9e5657 is described below

commit 0742e9e5657b6cf9fac1f875800285afa70cfec3
Author: minghong <[email protected]>
AuthorDate: Fri Apr 25 17:57:17 2025 +0800

    [opt](nereids) if stats for any side of join children is null, do not prune 
runtime filter (#50298)
    
    ### What problem does this PR solve?
    runtime filter pruning depends on stats of join children.
    But some times, stats may be removed by some post processors.
    if the stats is removed, NPE occurs.
    In this pr, if prunner meets null stats, just keep the related runtime
    filter to avoid NPE
---
 .../org/apache/doris/nereids/processor/post/RuntimeFilterPruner.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPruner.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPruner.java
index a096ee39972..884349da69c 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPruner.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPruner.java
@@ -274,6 +274,9 @@ public class RuntimeFilterPruner extends PlanPostProcessor {
     private boolean isEffectiveRuntimeFilter(EqualTo equalTo, PhysicalHashJoin 
join) {
         Statistics leftStats = ((AbstractPlan) join.child(0)).getStats();
         Statistics rightStats = ((AbstractPlan) join.child(1)).getStats();
+        if (leftStats == null || rightStats == null) {
+            return true;
+        }
         Set<Slot> leftSlots = equalTo.child(0).getInputSlots();
         if (leftSlots.size() > 1) {
             return false;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to