diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java index 48bbbea6fbea58b..c36c681706ee4de 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java @@ -547,8 +547,8 @@ public Statistics visitIsNull(IsNull isNull, EstimationContext context) { Expression child = isNull.child(); Statistics childStats = child.accept(this, context); outputRowCount = Math.max(childStats.getRowCount() * DEFAULT_ISNULL_SELECTIVITY, outputRowCount); + outputRowCount = Math.max(outputRowCount, 1); } - outputRowCount = Math.max(outputRowCount, 1); ColumnStatisticBuilder colBuilder = new ColumnStatisticBuilder(childColStats); colBuilder.setCount(outputRowCount).setNumNulls(outputRowCount)