This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 7f9232f301b [Pick](bitmap index) fix is_like_predicate for bitmap 
index evaluate #25961 (#26295)
7f9232f301b is described below

commit 7f9232f301b76b6c34aa7c699ca463a1de0839d9
Author: airborne12 <[email protected]>
AuthorDate: Thu Nov 2 21:42:19 2023 +0800

    [Pick](bitmap index) fix is_like_predicate for bitmap index evaluate #25961 
(#26295)
---
 be/src/olap/comparison_predicate.h                 | 2 +-
 be/src/olap/in_list_predicate.h                    | 2 +-
 be/src/olap/rowset/segment_v2/segment_iterator.cpp | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/be/src/olap/comparison_predicate.h 
b/be/src/olap/comparison_predicate.h
index 53149ea7ed4..f1e6fdf5d01 100644
--- a/be/src/olap/comparison_predicate.h
+++ b/be/src/olap/comparison_predicate.h
@@ -429,7 +429,7 @@ private:
                            roaring::Roaring* bitmap) const {
         roaring::Roaring roaring;
 
-        if (status.is<ErrorCode::NOT_FOUND>()) {
+        if (status.is<ErrorCode::ENTRY_NOT_FOUND>()) {
             if constexpr (PT == PredicateType::EQ || PT == PredicateType::GT ||
                           PT == PredicateType::GE) {
                 *bitmap &= roaring; // set bitmap to empty
diff --git a/be/src/olap/in_list_predicate.h b/be/src/olap/in_list_predicate.h
index 329c9b8dc0e..afd82108fff 100644
--- a/be/src/olap/in_list_predicate.h
+++ b/be/src/olap/in_list_predicate.h
@@ -199,7 +199,7 @@ public:
             bool exact_match;
             Status s = iterator->seek_dictionary(value, &exact_match);
             rowid_t seeked_ordinal = iterator->current_ordinal();
-            if (!s.is<ErrorCode::NOT_FOUND>()) {
+            if (!s.is<ErrorCode::ENTRY_NOT_FOUND>()) {
                 if (!s.ok()) {
                     return s;
                 }
diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.cpp 
b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
index 28274752b05..0b61cea15de 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
@@ -532,8 +532,8 @@ Status SegmentIterator::_apply_bitmap_index() {
 
     std::vector<ColumnPredicate*> remaining_predicates;
     auto is_like_predicate = [](ColumnPredicate* _pred) {
-        if (static_cast<LikeColumnPredicate<TYPE_CHAR>*>(_pred) != nullptr ||
-            static_cast<LikeColumnPredicate<TYPE_STRING>*>(_pred) != nullptr) {
+        if (dynamic_cast<LikeColumnPredicate<TYPE_CHAR>*>(_pred) != nullptr ||
+            dynamic_cast<LikeColumnPredicate<TYPE_STRING>*>(_pred) != nullptr) 
{
             return true;
         }
 


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

Reply via email to