[fix](nereids-Branch-2.1) fix bug: try to prune a not-exist rf #34630

This commit is contained in:
minghong
2024-05-10 14:28:19 +08:00
committed by GitHub
parent cbe8e5c010
commit 60e5583b01
2 changed files with 3 additions and 2 deletions

View File

@ -45,6 +45,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@ -353,7 +354,7 @@ public class RuntimeFilterContext {
}
public List<ExprId> getTargetExprIdByFilterJoin(AbstractPhysicalJoin join) {
return joinToTargetExprId.get(join);
return joinToTargetExprId.getOrDefault(join, new ArrayList<>());
}
public SlotReference getCorrespondingOlapSlotReference(SlotReference slot) {

View File

@ -155,7 +155,7 @@ public class RuntimeFilterPruner extends PlanPostProcessor {
context.getRuntimeFilterContext().addEffectiveSrcNode(join, childType);
} else {
List<ExprId> exprIds = rfContext.getTargetExprIdByFilterJoin(join);
if (exprIds != null && !exprIds.isEmpty()) {
if (!exprIds.isEmpty()) {
boolean isEffective = false;
for (Expression expr : join.getEqualToConjuncts()) {
if (isEffectiveRuntimeFilter((EqualTo) expr, join)) {