From 78f89f9e5426a391f2b699b8b62118fed49fca20 Mon Sep 17 00:00:00 2001 From: 924060929 <924060929@qq.com> Date: Wed, 20 Mar 2024 15:52:55 +0800 Subject: [PATCH] fix --- .../nereids/trees/plans/logical/LogicalCheckPolicy.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCheckPolicy.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCheckPolicy.java index 1f7497e537c7501..bda3b1f49d570d4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCheckPolicy.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCheckPolicy.java @@ -44,6 +44,7 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; +import org.apache.commons.collections.CollectionUtils; import java.util.ArrayList; import java.util.List; @@ -168,11 +169,8 @@ public RelatedPolicy findPolicy(LogicalRelation logicalRelation, CascadesContext List policies = accessManager.evalRowFilterPolicies( currentUserIdentity, ctlName, dbName, tableName); - if (policies.isEmpty()) { - return RelatedPolicy.NO_POLICY; - } return new RelatedPolicy( - Optional.ofNullable(mergeRowPolicy(policies)), + Optional.ofNullable(CollectionUtils.isEmpty(policies) ? null : mergeRowPolicy(policies)), hasDataMask ? Optional.of(dataMasks.build()) : Optional.empty() ); }