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

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


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 62801e3303c [Cherry-pick](rf)fix core dump on rf between varchar and 
char #43758 (#43919)
62801e3303c is described below

commit 62801e3303c3dbe1229f6687edc8e63e72b2a6f7
Author: Pxl <x...@selectdb.com>
AuthorDate: Thu Nov 14 15:31:22 2024 +0800

    [Cherry-pick](rf)fix core dump on rf between varchar and char #43758 
(#43919)
    
    ### What problem does this PR solve?
    pick from #43758
---
 be/src/exprs/create_predicate_function.h | 2 +-
 be/src/olap/bloom_filter_predicate.h     | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/be/src/exprs/create_predicate_function.h 
b/be/src/exprs/create_predicate_function.h
index 4808caa00f3..9998db887c1 100644
--- a/be/src/exprs/create_predicate_function.h
+++ b/be/src/exprs/create_predicate_function.h
@@ -234,7 +234,7 @@ ColumnPredicate* create_olap_column_predicate(uint32_t 
column_id,
     std::shared_ptr<BloomFilterFuncBase> filter_olap;
     filter_olap.reset(create_bloom_filter(PT));
     filter_olap->light_copy(filter.get());
-    return new BloomFilterColumnPredicate<PT>(column_id, filter);
+    return new BloomFilterColumnPredicate<PT>(column_id, filter_olap);
 }
 
 template <PrimitiveType PT>
diff --git a/be/src/olap/bloom_filter_predicate.h 
b/be/src/olap/bloom_filter_predicate.h
index 0e2ae500ac6..2759a5c5fe0 100644
--- a/be/src/olap/bloom_filter_predicate.h
+++ b/be/src/olap/bloom_filter_predicate.h
@@ -93,7 +93,9 @@ private:
 
     int get_filter_id() const override {
         int filter_id = _filter->get_filter_id();
-        DCHECK(filter_id != -1);
+        if (filter_id == 1) {
+            throw Exception(ErrorCode::INTERNAL_ERROR, "filter_id is -1");
+        }
         return filter_id;
     }
     bool is_filter() const override { return true; }


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

Reply via email to