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

[PR] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   ## Proposed changes
    Supplement statistics and modify the previous is_filter logic to use _can_ignore for representation.
   
   
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   


-- 
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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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


##########
be/src/olap/column_predicate.h:
##########
@@ -303,6 +301,14 @@ class ColumnPredicate {
     }
 
     bool always_true() const { return _always_true; }
+    // Return whether the ColumnPredicate was created by a runtime filter.
+    // If true, it was definitely created by a runtime filter.
+    // If false, it may still have been created by a runtime filter,
+    // as certain filters like "in filter" generate key ranges instead of ColumnPredicate.
+    // is_runtime_filter uses _can_ignore, except for BitmapFilter,
+    // as BitmapFilter cannot ignore data.
+

Review Comment:
   remove unless space



-- 
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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   TeamCity be ut coverage result:
    Function Coverage: 37.82% (9821/25966) 
    Line Coverage: 28.99% (81632/281567)
    Region Coverage: 28.26% (42147/149153)
    Branch Coverage: 24.83% (21382/86108)
    Coverage Report: http://coverage.selectdb-in.cc/coverage/f700ded3c17cef27c22c561a28a216e4071265ad_f700ded3c17cef27c22c561a28a216e4071265ad/report/index.html


-- 
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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   TeamCity be ut coverage result:
    Function Coverage: 37.94% (9849/25958) 
    Line Coverage: 29.19% (82063/281107)
    Region Coverage: 28.45% (42342/148854)
    Branch Coverage: 25.02% (21509/85984)
    Coverage Report: http://coverage.selectdb-in.cc/coverage/567ded2ce6ace2f064d90ed3eb334d01374f4ac5_567ded2ce6ace2f064d90ed3eb334d01374f4ac5/report/index.html


-- 
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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   TeamCity be ut coverage result:
    Function Coverage: 37.82% (9822/25967) 
    Line Coverage: 29.00% (81623/281504)
    Region Coverage: 28.27% (42148/149101)
    Branch Coverage: 24.84% (21382/86068)
    Coverage Report: http://coverage.selectdb-in.cc/coverage/567ded2ce6ace2f064d90ed3eb334d01374f4ac5_567ded2ce6ace2f064d90ed3eb334d01374f4ac5/report/index.html


-- 
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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   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


Re: [PR] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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


-- 
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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   TeamCity be ut coverage result:
    Function Coverage: 37.82% (9821/25966) 
    Line Coverage: 28.97% (81582/281567)
    Region Coverage: 28.26% (42147/149153)
    Branch Coverage: 24.83% (21377/86108)
    Coverage Report: http://coverage.selectdb-in.cc/coverage/f700ded3c17cef27c22c561a28a216e4071265ad_f700ded3c17cef27c22c561a28a216e4071265ad/report/index.html


-- 
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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   clang-tidy review says "All clean, LGTM! :+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: 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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   clang-tidy review says "All clean, LGTM! :+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: 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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1772,15 +1772,17 @@ uint16_t SegmentIterator::_evaluate_vectorization_predicate(uint16_t* sel_rowid_
         }
     }
 
+    const uint16_t original_size = selected_size;
     //If all predicates are always_true, then return directly.
     if (all_pred_always_true || !_is_need_vec_eval) {
-        for (uint16_t i = 0; i < selected_size; ++i) {
+        for (uint16_t i = 0; i < original_size; ++i) {
             sel_rowid_idx[i] = i;
         }
-        return selected_size;
+        // All preds are always_true, so return immediately and update the profile statistics here.
+        _opts.stats->vec_cond_input_rows += original_size;

Review Comment:
   to maintain consistency with the code below.



-- 
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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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

   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] [fix](profile) When all preds are always_true, input rows not be counted in the profile. [doris]

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


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1772,15 +1772,17 @@ uint16_t SegmentIterator::_evaluate_vectorization_predicate(uint16_t* sel_rowid_
         }
     }
 
+    const uint16_t original_size = selected_size;
     //If all predicates are always_true, then return directly.
     if (all_pred_always_true || !_is_need_vec_eval) {
-        for (uint16_t i = 0; i < selected_size; ++i) {
+        for (uint16_t i = 0; i < original_size; ++i) {
             sel_rowid_idx[i] = i;
         }
-        return selected_size;
+        // All preds are always_true, so return immediately and update the profile statistics here.
+        _opts.stats->vec_cond_input_rows += original_size;

Review Comment:
   seems only add one row is enough?



-- 
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