We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76905a1 commit eaf5520Copy full SHA for eaf5520
1 file changed
datafusion/datasource/src/write/orchestration.rs
@@ -211,9 +211,12 @@ pub(crate) async fn stateless_serialize_and_write_files(
211
212
// Finalize or abort writers as appropriate
213
for mut writer in finished_writers.into_iter() {
214
- writer.shutdown()
215
- .await
216
- .map_err(|_| internal_datafusion_err!("Error encountered while finalizing writes! Partial results may have been written to ObjectStore!"))?;
+ if let Err(e) = writer.shutdown().await {
+ // ignore if writer already closed
+ if e.kind() != std::io::ErrorKind::InvalidInput {
217
+ return Err(internal_datafusion_err!("Error encountered while finalizing writes! Partial results may have been written to ObjectStore! Error: {e}"));
218
+ }
219
220
}
221
222
if any_errors {
0 commit comments