From 06e43983174d11b3ee4e13ba907f9d32dcd6de75 Mon Sep 17 00:00:00 2001 From: 924060929 <924060929@qq.com> Date: Wed, 20 Mar 2024 18:53:54 +0800 Subject: [PATCH] fix --- .../nereids/rules/analysis/CheckPolicy.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckPolicy.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckPolicy.java index 1e1384a34016bf9..1e7d4dbb09d201a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckPolicy.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckPolicy.java @@ -74,22 +74,16 @@ public List buildRules() { } } - // row policy RelatedPolicy relatedPolicy = checkPolicy.findPolicy(relation, ctx.cascadesContext); - relatedPolicy.rowPolicyFilter.ifPresent(expression -> combineFilter.addAll( ExpressionUtils.extractConjunctionToSet(expression))); - - Plan result; - if (combineFilter.isEmpty()) { - result = relation; - } else { - if (upperFilter != null) { - combineFilter.addAll(upperFilter.getConjuncts()); - } + Plan result = relation; + if (upperFilter != null) { + combineFilter.addAll(upperFilter.getConjuncts()); + } + if (!combineFilter.isEmpty()) { result = new LogicalFilter<>(combineFilter, relation); } - if (relatedPolicy.dataMaskProjects.isPresent()) { result = new LogicalProject<>(relatedPolicy.dataMaskProjects.get(), result); }