Tanya-W commented on code in PR #17629:
URL: https://github.com/apache/doris/pull/17629#discussion_r1133492815
##########
be/src/olap/rowset/segment_v2/inverted_index_reader.cpp:
##########
@@ -191,36 +186,73 @@ Status FullTextIndexReader::query(OlapReaderStatistics*
stats, const std::string
}
switch (query_type) {
- case InvertedIndexQueryType::MATCH_ANY_QUERY: {
+ case InvertedIndexQueryOp::MATCH_ANY_QUERY: {
SCOPED_RAW_TIMER(&stats->inverted_index_query_bitmap_op_timer);
query_match_bitmap |= *term_match_bitmap;
break;
}
- case InvertedIndexQueryType::EQUAL_QUERY:
- case InvertedIndexQueryType::MATCH_ALL_QUERY: {
+ case InvertedIndexQueryOp::EQUAL_QUERY:
+ case InvertedIndexQueryOp::MATCH_ALL_QUERY: {
SCOPED_RAW_TIMER(&stats->inverted_index_query_bitmap_op_timer);
query_match_bitmap &= *term_match_bitmap;
break;
}
- case InvertedIndexQueryType::MATCH_PHRASE_QUERY: {
+ case InvertedIndexQueryOp::MATCH_PHRASE_QUERY: {
return
Status::Error<ErrorCode::INVERTED_INDEX_NOT_SUPPORTED>();
- break;
}
default: {
- LOG(ERROR) << "fulltext query do not support query type other
than match.";
+ LOG(ERROR) << "fulltext query do not support query type other "
+ "than match.";
return
Status::Error<ErrorCode::INVERTED_INDEX_NOT_SUPPORTED>();
}
}
}
-
- bit_map->swap(query_match_bitmap);
+ *bit_map |= query_match_bitmap;
Review Comment:
Think more about this logic, `bit_map` is input parameter which is copy from
`_row_bitmap` in segment_iterator, if `bit_map` is all 1 at begin, here union
with `query_match_bitmap`, the result of `bit_map` always all 1
--
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]