Skip to content

Commit

Permalink
fix(rust): Added proper handling of file.write for large remote csv f…
Browse files Browse the repository at this point in the history
…iles (#18424)

Co-authored-by: sascha <sascha.stoll@sap.com>
  • Loading branch information
WbaN314 and SaschaAtWork authored Sep 2, 2024
1 parent 36a56b6 commit 8a143c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/polars-io/src/cloud/polars_object_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ impl PolarsObjectStore {
while let Some(bytes) = stream.next().await {
let bytes = bytes.map_err(to_compute_err)?;
len += bytes.len();
file.write(bytes.as_ref()).await.map_err(to_compute_err)?;
file.write_all(bytes.as_ref())
.await
.map_err(to_compute_err)?;
}

PolarsResult::Ok(pl_async::Size::from(len as u64))
Expand Down

0 comments on commit 8a143c0

Please sign in to comment.