ethe commented on issue #6327:
URL: https://github.com/apache/arrow-rs/issues/6327#issuecomment-2317426922
But AsyncArrowWriter is created from AsyncFileWriter, creating an
`AsyncArrowWriter` from `&mut AsyncFileWriter` is exactly what I want.
```rust
struct CustomFile {
// ...
}
impl AsyncFileWriter for CustomFile {
fn write(
&mut self,
bs: bytes::Bytes,
) -> futures::future::BoxFuture<'_, parquet::errors::Result<()>> {
todo!()
}
fn complete(&mut self) -> futures::future::BoxFuture<'_,
parquet::errors::Result<()>> {
todo!()
}
}
fn test() {
let mut file = CustomFile {};
{
let mut writer =
AsyncArrowWriter::try_new(&mut file,
SchemaRef::from(Schema::empty()), None).unwrap();
// write record batch
writer.close()
}
// do something with file after writes
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]