Skip to content

Commit 1037918

Browse files
committed
refactor of RuntimeFilter
update update update update update update fix
1 parent b83e565 commit 1037918

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2374
-2468
lines changed

be/src/exprs/bitmapfilter_predicate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include <algorithm>
2121

22-
#include "exprs/runtime_filter.h"
22+
#include "exprs/runtime_filter/runtime_filter_definitions.h"
2323
#include "gutil/integral_types.h"
2424
#include "runtime/define_primitive_type.h"
2525
#include "runtime/primitive_type.h"

be/src/exprs/bloom_filter_func.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
#include "common/exception.h"
2121
#include "common/status.h"
2222
#include "exprs/block_bloom_filter.hpp"
23-
#include "exprs/runtime_filter.h"
23+
#include "exprs/runtime_filter/runtime_filter_definitions.h"
2424
#include "olap/rowset/segment_v2/bloom_filter.h" // IWYU pragma: keep
2525
#include "vec/columns/column_dictionary.h"
26+
#include "vec/columns/column_nullable.h"
2627
#include "vec/common/string_ref.h"
2728

2829
namespace doris {
@@ -129,6 +130,7 @@ class BloomFilterFuncBase : public RuntimeFilterFuncBase {
129130
_runtime_bloom_filter_max_size = params->runtime_bloom_filter_max_size;
130131
_null_aware = params->null_aware;
131132
_bloom_filter_size_calculated_by_ndv = params->bloom_filter_size_calculated_by_ndv;
133+
_enable_fixed_len_to_uint32_v2 = params->enable_fixed_len_to_uint32_v2;
132134
_limit_length();
133135
}
134136

@@ -234,16 +236,14 @@ class BloomFilterFuncBase : public RuntimeFilterFuncBase {
234236

235237
void set_contain_null_and_null_aware() { _bloom_filter->set_contain_null_and_null_aware(); }
236238

237-
void set_enable_fixed_len_to_uint32_v2() { _enable_fixed_len_to_uint32_v2 = true; }
238-
239239
size_t get_size() const { return _bloom_filter ? _bloom_filter->size() : 0; }
240240

241241
void light_copy(BloomFilterFuncBase* bloomfilter_func) {
242242
auto* other_func = static_cast<BloomFilterFuncBase*>(bloomfilter_func);
243243
_bloom_filter_alloced = other_func->_bloom_filter_alloced;
244244
_bloom_filter = other_func->_bloom_filter;
245245
_inited = other_func->_inited;
246-
_enable_fixed_len_to_uint32_v2 |= other_func->_enable_fixed_len_to_uint32_v2;
246+
_enable_fixed_len_to_uint32_v2 = other_func->_enable_fixed_len_to_uint32_v2;
247247
set_filter_id(bloomfilter_func->get_filter_id());
248248
}
249249

be/src/exprs/create_predicate_function.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ typename Traits::BasePtr create_predicate_function(PrimitiveType type) {
130130
APPLY_FOR_PRIMTYPE(M)
131131
#undef M
132132
default:
133-
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
134-
"predicate with type " + type_to_string(type));
133+
throw Status::InternalError("predicate with type " + type_to_string(type));
135134
}
136135

137136
return nullptr;
@@ -151,7 +150,7 @@ typename Traits::BasePtr create_bitmap_predicate_function(PrimitiveType type) {
151150
case TYPE_BIGINT:
152151
return Creator::template create<TYPE_BIGINT>();
153152
default:
154-
DCHECK(false) << "Invalid type: " << type_to_string(type);
153+
throw Status::InternalError("bitmap predicate with type " + type_to_string(type));
155154
}
156155

157156
return nullptr;

be/src/exprs/hybrid_set.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@
1717

1818
#pragma once
1919

20-
#include "exprs/runtime_filter.h"
21-
#include "exprs/runtime_filter_convertor.h"
20+
#include "common/object_pool.h"
21+
#include "exprs/runtime_filter/utils.h"
22+
#include "runtime/primitive_type.h"
23+
#include "vec/columns/column_nullable.h"
24+
#include "vec/columns/column_string.h"
25+
#include "vec/columns/column_vector.h"
26+
#include "vec/common/hash_table/phmap_fwd_decl.h"
2227

2328
namespace doris {
2429

be/src/exprs/minmax_predicate.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717

1818
#pragma once
1919

20-
#include "exprs/runtime_filter.h"
21-
#include "exprs/runtime_filter_convertor.h"
20+
#include "exprs/runtime_filter/utils.h"
21+
#include "runtime/type_limit.h"
22+
#include "vec/columns/column_nullable.h"
23+
#include "vec/columns/column_string.h"
2224

2325
namespace doris {
26+
2427
// only used in Runtime Filter
2528
class MinMaxFuncBase : public RuntimeFilterFuncBase {
2629
public:

0 commit comments

Comments
 (0)