Skip to content

Commit

Permalink
[Bug](runtime-filter) fix core dump on rf between varchar and char #…
Browse files Browse the repository at this point in the history
…43758  (#46966)

pick from #43758
  • Loading branch information
BiteTheDDDDt authored Jan 14, 2025
1 parent cc073f0 commit d606557
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions be/src/exprs/bloom_filter_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class BloomFilterFuncBase : public FilterFuncBase {
_bloom_filter_alloced = other_func->_bloom_filter_alloced;
_bloom_filter = other_func->_bloom_filter;
_inited = other_func->_inited;
set_filter_id(bloomfilter_func->get_filter_id());
}

virtual void insert(const void* data) = 0;
Expand Down
3 changes: 2 additions & 1 deletion be/src/exprs/create_predicate_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ 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, be_exec_version);
// create a new filter to match the input filter and PT. For example, filter may be varchar, but PT is char
return new BloomFilterColumnPredicate<PT>(column_id, filter_olap, be_exec_version);
}

template <PrimitiveType PT>
Expand Down

0 comments on commit d606557

Please sign in to comment.