Skip to content

Commit

Permalink
[Chore](check) add check for bf not inited and not ignored (#44781)
Browse files Browse the repository at this point in the history
add check for bf not inited and not ignored
  • Loading branch information
BiteTheDDDDt authored Nov 29, 2024
1 parent 0ffb71b commit 851d780
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions be/src/exprs/bloom_filter_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ class BloomFilterFuncBase : public RuntimeFilterFuncBase {
uint16_t* offsets, int number,
bool is_parse_column) = 0;

bool inited() const { return _inited; }

private:
void _limit_length() {
if (_runtime_bloom_filter_min_size > 0) {
Expand Down
7 changes: 7 additions & 0 deletions be/src/exprs/runtime_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,13 @@ PrimitiveType IRuntimeFilter::column_type() const {

void IRuntimeFilter::signal() {
DCHECK(is_consumer());

if (!_wrapper->is_ignored() && _wrapper->is_bloomfilter() &&
!_wrapper->get_bloomfilter()->inited()) {
throw Exception(ErrorCode::INTERNAL_ERROR, "bf not inited and not ignored, rf: {}",
debug_string());
}

COUNTER_SET(_wait_timer, int64_t((MonotonicMillis() - registration_time_) * NANOS_PER_MILLIS));
_rf_state_atomic.store(RuntimeFilterState::READY);
if (!_filter_timer.empty()) {
Expand Down

0 comments on commit 851d780

Please sign in to comment.