diff --git a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java index 6336be08ee473b..a5a1da6c73608e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java +++ b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java @@ -24,6 +24,7 @@ import org.apache.doris.cloud.proto.Cloud.MetaServiceCode; import org.apache.doris.cloud.rpc.VersionHelper; import org.apache.doris.common.profile.SummaryProfile; +import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.qe.ConnectContext; import org.apache.doris.qe.StmtExecutor; import org.apache.doris.rpc.RpcException; @@ -334,7 +335,8 @@ private static Cloud.GetVersionResponse getVersionFromMeta(Cloud.GetVersionReque private static boolean isEmptyPartitionPruneDisabled() { ConnectContext ctx = ConnectContext.get(); - if (ctx != null && ctx.getSessionVariable().getDisableEmptyPartitionPrune()) { + if (ctx != null && (ctx.getSessionVariable().getDisableNereidsRules().get(RuleType.valueOf( + "PRUNE_EMPTY_PARTITION").type()) || ctx.getSessionVariable().getDisableEmptyPartitionPrune())) { return true; } return false;