englefly commented on code in PR #40762:
URL: https://github.com/apache/doris/pull/40762#discussion_r1766081531


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java:
##########
@@ -117,13 +117,14 @@ public Statistics 
visitCompoundPredicate(CompoundPredicate predicate, Estimation
         Expression leftExpr = predicate.child(0);
         Expression rightExpr = predicate.child(1);
         Statistics leftStats = leftExpr.accept(this, context);
-        leftStats = 
leftStats.normalizeByRatio(context.statistics.getRowCount());
-        Statistics andStats = rightExpr.accept(this,
-                new EstimationContext(leftStats));
+        leftStats.normalizeColumnStatistics(context.statistics.getRowCount());

Review Comment:
   normalizeByRatio and enforceValid are different. 



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java:
##########
@@ -243,7 +243,7 @@ public ColumnStatistic visitLiteral(Literal literal, 
Statistics context) {
                 .setMaxValue(literalVal)
                 .setMinValue(literalVal)
                 .setNdv(1)

Review Comment:
   setNdv(literal.isNullLiteral() ? 0 : 1)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to