You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/04/29 02:45:52 UTC

[incubator-doris] branch master updated: [fix](profile) Short-circuit and del predicate filter rows are not counted on vectorized exec (#9268)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 2fa19113ab [fix](profile) Short-circuit and del predicate filter rows are not counted on vectorized exec (#9268)
2fa19113ab is described below

commit 2fa19113abf617e13d727b43cba81b114202c270
Author: ZenoYang <co...@qq.com>
AuthorDate: Fri Apr 29 10:45:48 2022 +0800

    [fix](profile) Short-circuit and del predicate filter rows are not counted on vectorized exec (#9268)
---
 be/src/olap/olap_common.h                                             | 2 +-
 be/src/olap/rowset/segment_v2/segment_iterator.cpp                    | 4 ++++
 docs/en/community/how-to-contribute/commit-format-specification.md    | 4 +++-
 docs/zh-CN/community/how-to-contribute/commit-format-specification.md | 1 +
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/olap_common.h b/be/src/olap/olap_common.h
index 8e7f7a16c3..fab987bb06 100644
--- a/be/src/olap/olap_common.h
+++ b/be/src/olap/olap_common.h
@@ -239,7 +239,7 @@ class Field;
 class WrapperField;
 using KeyRange = std::pair<WrapperField*, WrapperField*>;
 
-static const int GENERAL_DEBUG_COUNT = 4;
+static const int GENERAL_DEBUG_COUNT = 0;
 
 // ReaderStatistics used to collect statistics when scan data from storage
 struct OlapReaderStatistics {
diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.cpp b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
index fce68258ba..2e2d3a8ccd 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
@@ -863,6 +863,7 @@ void SegmentIterator::_evaluate_short_circuit_predicate(uint16_t* vec_sel_rowid_
         return;
     }
 
+    uint16_t original_size = *selected_size_ptr;
     for (auto predicate : _short_cir_eval_predicate) {
         auto column_id = predicate->column_id();
         auto& short_cir_column = _current_return_columns[column_id];
@@ -875,10 +876,13 @@ void SegmentIterator::_evaluate_short_circuit_predicate(uint16_t* vec_sel_rowid_
         predicate->set_dict_code_if_necessary(*short_cir_column);
         predicate->evaluate(*short_cir_column, vec_sel_rowid_idx, selected_size_ptr);
     }
+    _opts.stats->rows_vec_cond_filtered += original_size - *selected_size_ptr;
 
     // evaluate delete condition
+    original_size = *selected_size_ptr;
     _opts.delete_condition_predicates->evaluate(_current_return_columns, vec_sel_rowid_idx,
                                                 selected_size_ptr);
+    _opts.stats->rows_vec_del_cond_filtered += original_size - *selected_size_ptr;
 }
 
 void SegmentIterator::_read_columns_by_rowids(std::vector<ColumnId>& read_column_ids,
diff --git a/docs/en/community/how-to-contribute/commit-format-specification.md b/docs/en/community/how-to-contribute/commit-format-specification.md
index da4fb59203..b42b9a17f8 100644
--- a/docs/en/community/how-to-contribute/commit-format-specification.md
+++ b/docs/en/community/how-to-contribute/commit-format-specification.md
@@ -46,7 +46,7 @@ Commit is divided into ‘ title ’ and ‘ content ’ , the title should be l
         * style: Code style adjustment
         * typo: Code or Document correction
         * refactor: Code refactoring (no function changes involved)
-        * performance: Performance optimization
+        * performance/optimize: Performance optimization
         * test: Addition or repair of unit test
         * chore: Modification of build tool
         * revert: Revert a previous commit
@@ -78,7 +78,9 @@ Commit is divided into ‘ title ’ and ‘ content ’ , the title should be l
         * log
         * cache
         * config
+        * vectorization
         * docs
+        * profile
 
         Some tips:
 
diff --git a/docs/zh-CN/community/how-to-contribute/commit-format-specification.md b/docs/zh-CN/community/how-to-contribute/commit-format-specification.md
index 3272d0fb53..fde9828402 100644
--- a/docs/zh-CN/community/how-to-contribute/commit-format-specification.md
+++ b/docs/zh-CN/community/how-to-contribute/commit-format-specification.md
@@ -78,6 +78,7 @@ Commit 分为“标题”和“内容”。原则上标题全部小写。内容
         * config
         * vectorization
         * docs
+        * profile
         
         几点说明:
         


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