Skip to content

Commit

Permalink
deserialize join key directly
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed May 17, 2024
1 parent ace0230 commit 977d15d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stream/src/executor/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,8 @@ impl<K: HashKey, S: StateStore, const T: JoinTypePrimitive> HashJoinExecutor<K,
if let Some(rows) = &matched_rows {
join_matched_join_keys.observe(rows.len() as _);
if rows.len() > 10000 {
let join_key_data_types = side_update.ht.join_key_data_types();
let key = key.deserialize(join_key_data_types)?;
tracing::debug!(target: "hash_join_amplification",
matched_rows_len = rows.len(),
update_table_id = side_update.ht.table_id(),
Expand Down
4 changes: 4 additions & 0 deletions src/stream/src/executor/join/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,10 @@ impl<K: HashKey, S: StateStore> JoinHashMap<K, S> {
pub fn table_id(&self) -> u32 {
self.state.table.table_id()
}

pub fn join_key_data_types(&self) -> &[DataType] {
&self.join_key_data_types
}
}

use risingwave_common_estimate_size::KvSize;
Expand Down

0 comments on commit 977d15d

Please sign in to comment.