You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/05/06 09:20:43 UTC

[incubator-doris] 04/11: [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.

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

commit a927681e3f51ef30d77a42881c0042400444d73b
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 506308139d..6c7c0e598d 100644
--- a/be/src/olap/olap_common.h
+++ b/be/src/olap/olap_common.h
@@ -238,7 +238,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 9484601f12..a5767dcb08 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
@@ -858,6 +858,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];
@@ -869,10 +870,13 @@ void SegmentIterator::_evaluate_short_circuit_predicate(uint16_t* vec_sel_rowid_
         }
         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