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


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/Statistics.java:
##########
@@ -119,7 +119,8 @@ public void normalizeColumnStatistics(double inputRowCount, 
boolean isNumNullsDe
             // the following columnStatistic.isUnKnown() judgment is loop 
inside since current doris
             // supports partial stats deriving, i.e, allowing part of tables 
have stats and other parts don't,
             // or part of columns have stats but other parts don't, especially 
join and filter estimation.
-            if (!checkColumnStatsValid(columnStatistic, rowCount) && 
!columnStatistic.isUnKnown()) {
+            if ((!checkColumnStatsValid(columnStatistic, rowCount) && 
!columnStatistic.isUnKnown())
+                    || isNumNullsDecreaseByProportion && 
columnStatistic.numNulls != 0) {

Review Comment:
   if col stats is unknown, do not need normalize
   the condition should be:
   !columnStatistic.isUnKnown() && (!checkColumnStatsValid(columnStatistic, 
rowCount) || !checkColumnStatsValid(columnStatistic, rowCount))
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to