Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update tests
Browse files Browse the repository at this point in the history
sundy-li committed Dec 21, 2024
1 parent 8fd62f8 commit 3e77581
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -186,8 +186,9 @@ impl HashJoinSpiller {
} else {
// Cross join.
let spilled_files = self.spiller.private_spilled_files();
if !spilled_files.is_empty() {
let file_index = self.next_restore_file;
let file_index = self.next_restore_file;

if file_index < spilled_files.len() {
let spilled_data = self
.spiller
.read_spilled_file(&spilled_files[file_index])
@@ -248,7 +249,7 @@ impl HashJoinSpiller {
}

pub fn has_next_restore_file(&self) -> bool {
self.next_restore_file < self.spiller.spilled_files().len()
self.next_restore_file < self.spiller.private_spilled_files().len()
|| (self.next_restore_file == 0 && !self.partition_buffer.is_partition_empty(0))
}

4 changes: 0 additions & 4 deletions src/query/service/src/spillers/spiller.rs
Original file line number Diff line number Diff line change
@@ -484,10 +484,6 @@ impl Spiller {
BlocksEncoder::new(self.use_parquet, align, 8 * 1024 * 1024)
}

pub(crate) fn spilled_files(&self) -> Vec<Location> {
self.ctx.get_spilled_files()
}

pub(crate) fn private_spilled_files(&self) -> Vec<Location> {
let r = self.private_spilled_files.read();
r.keys().cloned().collect()

0 comments on commit 3e77581

Please sign in to comment.