Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
st1page committed Mar 26, 2024
1 parent 7945b84 commit 1f11695
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/batch/src/executor/join/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,11 @@ impl<K: HashKey> HashJoinExecutor<K> {
continue;
}
non_equi_state.found_matched = false;
non_equi_state
.first_output_row_id
.push(chunk_builder.buffered_count());
if let Some(first_matched_build_row_id) = hash_map.get(probe_key) {
non_equi_state
.first_output_row_id
.push(chunk_builder.buffered_count());

let mut build_row_id_iter = next_build_row_with_same_key
.row_id_iter(Some(*first_matched_build_row_id))
.peekable();
Expand Down Expand Up @@ -641,11 +642,12 @@ impl<K: HashKey> HashJoinExecutor<K> {
if !visible {
continue;
}
non_equi_state
.first_output_row_id
.push(chunk_builder.buffered_count());
non_equi_state.found_matched = false;
if let Some(first_matched_build_row_id) = hash_map.get(probe_key) {
non_equi_state
.first_output_row_id
.push(chunk_builder.buffered_count());

for build_row_id in
next_build_row_with_same_key.row_id_iter(Some(*first_matched_build_row_id))
{
Expand Down Expand Up @@ -2412,13 +2414,13 @@ mod tests {

let expected_chunk = DataChunk::from_pretty(
"i f i F
1 6.1 . .
2 . . .
. 8.4 . .
3 3.9 . .
. . . .
4 6.6 4 7.5
3 . . .
1 6.1 . .
. 8.4 . .
. . . .
. 0.7 . .
5 . . .
. 5.5 . .",
Expand Down

0 comments on commit 1f11695

Please sign in to comment.