Skip to content

Commit 2a51166

Browse files
committed
Merge branch 'main' of https://github.com/datafuselabs/databend into add_runtime_bloom_filter_for_merge_into
2 parents 38cd7a7 + c50606c commit 2a51166

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

โ€Žsrc/query/service/src/pipelines/processors/transforms/hash_join/hash_join_build_state.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ impl HashJoinBuildState {
153153
let mut enable_bloom_runtime_filter = false;
154154
let mut enable_inlist_runtime_filter = false;
155155
let mut enable_min_max_runtime_filter = false;
156-
if supported_join_type_for_runtime_filter(&hash_join_state.hash_join_desc.join_type)
157-
&& ctx.get_settings().get_join_spilling_memory_ratio()? == 0
158-
{
156+
if supported_join_type_for_runtime_filter(&hash_join_state.hash_join_desc.join_type) {
159157
let is_cluster = !ctx.get_cluster().is_empty();
160158
// For cluster, only support runtime filter for broadcast join.
161159
let is_broadcast_join = hash_join_state.hash_join_desc.broadcast;
@@ -327,7 +325,10 @@ impl HashJoinBuildState {
327325
.clone()
328326
};
329327

330-
self.add_runtime_filter(&build_chunks, build_num_rows)?;
328+
// If spilling happened, skip adding runtime filter, because probe data is ready and spilled.
329+
if self.spilled_partition_set.read().is_empty() {
330+
self.add_runtime_filter(&build_chunks, build_num_rows)?;
331+
}
331332

332333
if self.hash_join_state.hash_join_desc.join_type == JoinType::Cross {
333334
return Ok(());

โ€Žtests/sqllogictests/suites/tpch/queries.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ Brand#13 LARGE BURNISHED COPPER 45 8
802802
Brand#13 MEDIUM ANODIZED STEEL 23 8
803803

804804
#Q17
805+
805806
query I
806807
select
807808
truncate(sum(l_extendedprice) / 7.0,8) as avg_yearly

0 commit comments

Comments
ย (0)