From c471942a8d769cb3e44bd1426a3cd5659ebc608b Mon Sep 17 00:00:00 2001 From: BiteTheDDDDt Date: Wed, 9 Oct 2024 16:03:48 +0800 Subject: [PATCH 1/2] add check for BloomFilterFuncBase --- be/src/exprs/bloom_filter_func.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/exprs/bloom_filter_func.h b/be/src/exprs/bloom_filter_func.h index 6d452bbe9922dc..ad43b78cc6abb5 100644 --- a/be/src/exprs/bloom_filter_func.h +++ b/be/src/exprs/bloom_filter_func.h @@ -151,19 +151,19 @@ class BloomFilterFuncBase : public RuntimeFilterFuncBase { } Status merge(BloomFilterFuncBase* bloomfilter_func) { + DCHECK(bloomfilter_func != nullptr); + DCHECK(bloomfilter_func->_bloom_filter != nullptr); // If `_inited` is false, there is no memory allocated in bloom filter and this is the first // call for `merge` function. So we just reuse this bloom filter, and we don't need to // allocate memory again. if (!_inited) { auto* other_func = static_cast(bloomfilter_func); DCHECK(_bloom_filter == nullptr); - DCHECK(bloomfilter_func != nullptr); _bloom_filter = bloomfilter_func->_bloom_filter; _bloom_filter_alloced = other_func->_bloom_filter_alloced; _inited = true; return Status::OK(); } - DCHECK(bloomfilter_func != nullptr); auto* other_func = static_cast(bloomfilter_func); if (_bloom_filter_alloced != other_func->_bloom_filter_alloced) { return Status::InternalError( From a03e5e0d1876e2542754544ce1ba99937a3b83f0 Mon Sep 17 00:00:00 2001 From: BiteTheDDDDt Date: Wed, 9 Oct 2024 16:24:45 +0800 Subject: [PATCH 2/2] update --- be/src/pipeline/exec/hashjoin_build_sink.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/pipeline/exec/hashjoin_build_sink.cpp b/be/src/pipeline/exec/hashjoin_build_sink.cpp index 93d22850dfcbb1..e72904cb0ce55e 100644 --- a/be/src/pipeline/exec/hashjoin_build_sink.cpp +++ b/be/src/pipeline/exec/hashjoin_build_sink.cpp @@ -135,7 +135,7 @@ Status HashJoinBuildSinkLocalState::close(RuntimeState* state, Status exec_statu } }}; - if (!_runtime_filter_slots || _runtime_filters.empty() || state->is_cancelled() || !_eos) { + if (!_runtime_filter_slots || _runtime_filters.empty() || state->is_cancelled()) { return Base::close(state, exec_status); } auto* block = _shared_state->build_block.get();