This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 3d10db4786a branch-2.1 [opt](nereids) set column stats unkown by default when derive Not expressoin #48864 (#49742) 3d10db4786a is described below commit 3d10db4786ae77ed440a18baa36e58e2c4ee395f Author: minghong <zhoumingh...@selectdb.com> AuthorDate: Thu Apr 3 09:48:46 2025 +0800 branch-2.1 [opt](nereids) set column stats unkown by default when derive Not expressoin #48864 (#49742) --- .../java/org/apache/doris/nereids/stats/FilterEstimation.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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 c942b18ca98..2e42dfc7c58 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 @@ -511,14 +511,6 @@ public class FilterEstimation extends ExpressionVisitor<Statistics, EstimationCo // 4. not A like XXX // 5. not array_contains([xx, xx], xx) colBuilder.setNumNulls(0); - Preconditions.checkArgument( - child instanceof EqualPredicate - || child instanceof InPredicate - || child instanceof IsNull - || child instanceof Like - || child instanceof Match - || child instanceof Function, - "Not-predicate meet unexpected child: %s", child.toSql()); if (child instanceof Like) { rowCount = context.statistics.getRowCount() - childStats.getRowCount(); colBuilder.setNdv(Math.max(1.0, originColStats.ndv - childColStats.ndv)); @@ -543,6 +535,9 @@ public class FilterEstimation extends ExpressionVisitor<Statistics, EstimationCo } else if (child instanceof Match) { rowCount = context.statistics.getRowCount() - childStats.getRowCount(); colBuilder.setNdv(Math.max(1.0, originColStats.ndv - childColStats.ndv)); + } else { + rowCount = context.statistics.getRowCount() - childStats.getRowCount(); + colBuilder.setIsUnknown(true); } if (not.child().getInputSlots().size() == 1 && !(child instanceof IsNull)) { // only consider the single column numNull, otherwise, ignore --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org