[opt](nereids) use rowcount to compute runtime filter size if ndv is not available (#26022)

This commit is contained in:
minghong
2023-10-31 16:52:17 +08:00
committed by GitHub
parent 97646b098e
commit a6e010f722

View File

@ -345,7 +345,8 @@ public class RuntimeFilterGenerator extends PlanPostProcessor {
}
ExpressionEstimation estimator = new ExpressionEstimation();
ColumnStatistic buildColStats = compare.right().accept(estimator, right.getStats());
return buildColStats.isUnKnown ? -1 : Math.max(1, (long) buildColStats.ndv);
return buildColStats.isUnKnown
? Math.max(1, (long) right.getStats().getRowCount()) : Math.max(1, (long) buildColStats.ndv);
}
public static Slot checkTargetChild(Expression leftChild) {