Skip to content

Commit

Permalink
chore: minor refactor of adjust_bloom_runtime_filter (#14697)
Browse files Browse the repository at this point in the history
chore: minor refactor for adjust_bloom_runtime_filter

Co-authored-by: Bohu <overred.shuttler@gmail.com>
  • Loading branch information
xudong963 and BohuTANG authored Feb 21, 2024
1 parent cb07067 commit 513555a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,8 @@ impl HashJoinBuildState {
if !is_cluster || is_broadcast_join {
enable_inlist_runtime_filter = true;
enable_min_max_runtime_filter = true;
if ctx.get_settings().get_bloom_runtime_filter()?
&& hash_join_state.hash_join_desc.enable_bloom_runtime_filter
{
enable_bloom_runtime_filter = true;
}
enable_bloom_runtime_filter =
hash_join_state.hash_join_desc.enable_bloom_runtime_filter;
}
}
let chunk_size_limit = ctx.get_settings().get_max_block_size()? as usize * 16;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,10 @@ async fn adjust_bloom_runtime_filter(
table_index: Option<IndexType>,
s_expr: &SExpr,
) -> Result<bool> {
// The setting of `enable_bloom_runtime_filter` is true by default.
if !ctx.get_settings().get_bloom_runtime_filter()? {
return Ok(false);
}
if let Some(table_index) = table_index {
let table = metadata.read().table(table_index).table();
if let Some(stats) = table.table_statistics(ctx.clone()).await? {
Expand Down

0 comments on commit 513555a

Please sign in to comment.