Skip to content

Commit fe2444f

Browse files
committed
address comments
1 parent ec9c55d commit fe2444f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/query/service/src/pipelines/processors/transforms/hash_join/join_hash_table.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,14 @@ impl JoinHashTable {
435435
}
436436

437437
fn find_unmatched_build_indexes(&self) -> Result<Vec<RowPtr>> {
438-
// For right join, build side will appear at lease once in the joined table
438+
// For right join, build side will appear at least once in the joined table
439439
// Find the unmatched rows in build side
440440
let mut unmatched_build_indexes = vec![];
441441
let build_indexes = self.hash_join_desc.right_join_desc.build_indexes.read();
442442
let build_indexes_set: HashSet<&RowPtr> = build_indexes.iter().collect();
443-
let chunks = self.row_space.chunks.read().unwrap();
444-
for (chunk_index, chunk) in chunks.iter().enumerate() {
443+
// TODO(xudong): remove the line of code below after https://github.com/rust-lang/rust-clippy/issues/8987
444+
#[allow(clippy::significant_drop_in_scrutinee)]
445+
for (chunk_index, chunk) in self.row_space.chunks.read().unwrap().iter().enumerate() {
445446
for row_index in 0..chunk.num_rows() {
446447
let row_ptr = RowPtr {
447448
chunk_index: chunk_index as u32,
@@ -455,7 +456,6 @@ impl JoinHashTable {
455456
}
456457
}
457458
}
458-
drop(chunks);
459459
Ok(unmatched_build_indexes)
460460
}
461461
}

src/query/service/src/pipelines/processors/transforms/hash_join/result_blocks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ impl JoinHashTable {
655655

656656
pub(crate) fn filter_rows_for_right_join(
657657
bm: &mut MutableBitmap,
658-
build_indexes: &Vec<RowPtr>,
658+
build_indexes: &[RowPtr],
659659
row_state: &mut std::collections::HashMap<RowPtr, usize>,
660660
) {
661661
for (index, row) in build_indexes.iter().enumerate() {

0 commit comments

Comments
 (0)