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/06 06:34:46 UTC

[GitHub] [doris] englefly commented on a diff in pull request #10631: [refactor] add evaluate_and_vec() for ComparisonPredicateBase

englefly commented on code in PR #10631:
URL: https://github.com/apache/doris/pull/10631#discussion_r914463422


##########
be/src/olap/comparison_predicate.h:
##########
@@ -262,7 +263,71 @@ class ComparisonPredicateBase : public ColumnPredicate {
                                 ->get_data()
                                 .data();
 
-                _base_loop_vec<false>(size, flags, nullptr, data_array, _value_real);
+                _base_loop_vec<false, false>(size, flags, nullptr, data_array, _value_real);
+            }
+        }
+
+        if (_opposite) {
+            for (uint16_t i = 0; i < size; i++) {
+                flags[i] = !flags[i];
+            }
+        }
+    }
+
+    void evaluate_and_vec(const vectorized::IColumn& column, uint16_t size,

Review Comment:
   evaluate_and_vec  和 evaluate_vec 都是 virtual 函数,所以不能用模板。如果要用一个函数实现,就只能在函数里面 if-else 判断,影响了性能,所以分成了两个



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