You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "xzj7019 (via GitHub)" <gi...@apache.org> on 2024/10/22 14:32:13 UTC

[PR] [opt](nereids) fix non-null selectivity computing [doris]

xzj7019 opened a new pull request, #42286:
URL: https://github.com/apache/doris/pull/42286

   Introduced by pr: https://github.com/apache/doris/pull/40762
   which doesn't update numNulls and other related column stats when they needs to be normalized.
   This pr adds the updating trigger condition and makes the related case healthy. 
   
   


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #42286:
URL: https://github.com/apache/doris/pull/42286#issuecomment-2429457164

   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)
   
   Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
   See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "xzj7019 (via GitHub)" <gi...@apache.org>.
xzj7019 commented on PR #42286:
URL: https://github.com/apache/doris/pull/42286#issuecomment-2430939324

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #42286:
URL: https://github.com/apache/doris/pull/42286#issuecomment-2431609906

   PR approved by at least one committer and no changes requested.


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "xzj7019 (via GitHub)" <gi...@apache.org>.
xzj7019 commented on code in PR #42286:
URL: https://github.com/apache/doris/pull/42286#discussion_r1811688343


##########
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:
   that's right, thx for the suggestion



-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "xzj7019 (via GitHub)" <gi...@apache.org>.
xzj7019 commented on PR #42286:
URL: https://github.com/apache/doris/pull/42286#issuecomment-2430704527

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "xzj7019 (via GitHub)" <gi...@apache.org>.
xzj7019 commented on PR #42286:
URL: https://github.com/apache/doris/pull/42286#issuecomment-2431237129

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "xzj7019 (via GitHub)" <gi...@apache.org>.
xzj7019 commented on PR #42286:
URL: https://github.com/apache/doris/pull/42286#issuecomment-2431137598

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "xzj7019 (via GitHub)" <gi...@apache.org>.
xzj7019 commented on PR #42286:
URL: https://github.com/apache/doris/pull/42286#issuecomment-2429457589

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow merged PR #42286:
URL: https://github.com/apache/doris/pull/42286


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [opt](nereids) fix non-null selectivity computing [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #42286:
URL: https://github.com/apache/doris/pull/42286#issuecomment-2431610066

   PR approved by anyone and no changes requested.


-- 
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-unsubscribe@doris.apache.org

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


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