HappenLee commented on code in PR #32620:
URL: https://github.com/apache/doris/pull/32620#discussion_r1554955830


##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -1209,6 +1226,34 @@ Status SegmentIterator::_apply_inverted_index() {
         }
     }
 
+    // support expr to evaluate inverted index
+    std::unordered_map<ColumnId, std::pair<vectorized::NameAndTypePair, 
InvertedIndexIterator*>>
+            iter_map;
+
+    for (auto col_id : _common_expr_columns) {
+        if (_check_apply_by_inverted_index(col_id)) {
+            iter_map[col_id] = std::make_pair(_storage_name_and_type[col_id],
+                                              
_inverted_index_iterators[col_id].get());
+        }
+    }
+    for (auto expr_ctx : _common_expr_ctxs_push_down) {
+        // _inverted_index_iterators has all column ids which has inverted 
index
+        // _common_expr_columns has all column ids from 
_common_expr_ctxs_push_down
+        // if current bitmap is already empty just return
+        if (_row_bitmap.isEmpty()) {
+            break;
+        }
+        roaring::Roaring bitmap = _row_bitmap;
+        const Status st = expr_ctx->eval_inverted_indexs(iter_map, num_rows(), 
&bitmap);
+        if (!st.ok()) {
+            LOG(WARNING) << "failed to evaluate index in expr" << 
expr_ctx->root()->debug_string()

Review Comment:
   lots of function not support `eval_inverted_indexs` we better not log each 
time, cause too mush useless log



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to