Skip to content

Commit

Permalink
Return error if spill file does not exist in ExternalSorter (#7479)
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya authored Sep 5, 2023
1 parent 716e197 commit a2caad0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datafusion/core/src/physical_plan/sorts/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,12 @@ impl ExternalSorter {
}

for spill in self.spills.drain(..) {
if !spill.path().exists() {
return Err(DataFusionError::Internal(format!(
"Spill file {:?} does not exist",
spill.path()
)));
}
let stream = read_spill_as_stream(spill, self.schema.clone())?;
streams.push(stream);
}
Expand Down

0 comments on commit a2caad0

Please sign in to comment.