You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/04 01:18:51 UTC

[GitHub] [doris] yiguolei commented on a diff in pull request #10564: [improvement]No need to memset flags for vectorization predicates

yiguolei commented on code in PR #10564:
URL: https://github.com/apache/doris/pull/10564#discussion_r912566527


##########
be/src/olap/block_column_predicate.cpp:
##########
@@ -234,12 +234,16 @@ void AndBlockColumnPredicate::evaluate_vec(vectorized::MutableColumns& block, ui
         _block_column_predicate_vec[0]->evaluate_vec(block, size, flags);
     } else {
         bool new_flags[size];
+        bool initialized = false;
         for (auto block_column_predicate : _block_column_predicate_vec) {
-            memset(new_flags, true, size);
-            block_column_predicate->evaluate_vec(block, size, new_flags);
-
-            for (uint16_t j = 0; j < size; j++) {
-                flags[j] &= new_flags[j];
+            if (initialized) {
+                block_column_predicate->evaluate_vec(block, size, new_flags);

Review Comment:
   If new flags is not init for every predicate, the value is not precise in new_flags for next predicate?



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