Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xudong963 committed Dec 11, 2023
1 parent b197006 commit 06562a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,19 @@ impl HashJoinState {
data_blocks.clear();
return Ok(());
}
let mut runtime_filters = Vec::with_capacity(self.hash_join_desc.build_keys.len());
for (build_key, probe_key) in self
.hash_join_desc
.build_keys
.iter()
.zip(self.hash_join_desc.probe_keys_rt.iter())
{
if let Some(filter) = inlist_filter(&func_ctx, build_key, probe_key, data_blocks)? {
self.ctx.set_runtime_filter((self.table_index, filter))
runtime_filters.push(filter);
}
}
self.ctx
.set_runtime_filter((self.table_index, runtime_filters));
data_blocks.clear();
Ok(())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub(crate) fn inlist_filter(
build_key: &Expr,
probe_key: &Expr<String>,
build_blocks: &[DataBlock],
) -> Result<Option<Vec<Expr<String>>>> {
) -> Result<Option<Expr<String>>> {
// Currently, only support key is a column, will support more later.
// Such as t1.a + 1 = t2.a, or t1.a + t1.b = t2.a (left side is probe side)
if let Expr::ColumnRef {
Expand Down Expand Up @@ -124,7 +124,7 @@ pub(crate) fn inlist_filter(
args,
};
let expr = type_check::check(&contain_func, &BUILTIN_FUNCTIONS)?;
return Ok(Some(vec![expr]));
return Ok(Some(expr));
}
Ok(None)
}

0 comments on commit 06562a8

Please sign in to comment.