Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
FileSink now closes the underlying writer.
Browse files Browse the repository at this point in the history
  • Loading branch information
samkaufman committed Aug 5, 2022
1 parent 3b9d86b commit 90d1193
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/io/parquet/write/sink.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ahash::AHashMap;
use std::{pin::Pin, task::Poll};

use futures::{future::BoxFuture, AsyncWrite, FutureExt, Sink, TryFutureExt};
use futures::{future::BoxFuture, AsyncWrite, AsyncWriteExt, FutureExt, Sink, TryFutureExt};
use parquet2::metadata::KeyValue;
use parquet2::write::FileStreamer;
use parquet2::write::WriteOptions as ParquetWriteOptions;
Expand Down Expand Up @@ -218,6 +218,7 @@ where

this.task = Some(Box::pin(async move {
writer.end(kv_meta).map_err(Error::from).await?;
writer.into_inner().close().map_err(Error::from).await?;
Ok(None)
}));
this.poll_complete(cx)
Expand Down

0 comments on commit 90d1193

Please sign in to comment.