imay commented on a change in pull request #2319: Add Bitmap index reader
URL: https://github.com/apache/incubator-doris/pull/2319#discussion_r352639264
 
 

 ##########
 File path: be/src/olap/in_list_predicate.cpp
 ##########
 @@ -109,6 +109,39 @@ IN_LIST_PRED_EVALUATE(NotInListPredicate, ==)
 IN_LIST_PRED_COLUMN_BLOCK_EVALUATE(InListPredicate, !=)
 IN_LIST_PRED_COLUMN_BLOCK_EVALUATE(NotInListPredicate, ==)
 
+#define IN_LIST_PRED_BITMAP_EVALUATE(CLASS, OP) \
+    template<class type> \
+    Status CLASS<type>::evaluate(const Schema& schema, const 
vector<BitmapIndexIterator*>& iterators, uint32_t num_rows, Roaring* bitmap) 
const { \
+        BitmapIndexIterator *iterator = iterators[_column_id]; \
+        if (iterator == nullptr) { \
+            return Status::OK(); \
+        } \
+        if (iterator->has_null_bitmap()) { \
+            Roaring null_bitmap; \
+            RETURN_IF_ERROR(iterator->read_null_bitmap(&null_bitmap)); \
+            *bitmap -= null_bitmap; \
+        } \
+        Roaring roaring; \
+        for (auto value:_values) { \
+            bool exact_match; \
+            Status s = iterator->seek_dictionary(&value, &exact_match); \
+            rowid_t seeked_ordinal = iterator->current_ordinal(); \
+            if (!s.is_not_found()) { \
+                if (!s.ok()) { return s; } \
+                if (exact_match) { \
+                    Roaring bitmap; \
 
 Review comment:
   rename it, it was duplicate with input param.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to