ashtuchkin commented on issue #6326: URL: https://github.com/apache/arrow-rs/issues/6326#issuecomment-2318241177
> > Here's alternative proposal - can we add a finish(&mut self) to the trait to enable dynamic dispatch > > I believe the trait would still not be object safe, due to the presence of the close method It won't be object-safe, but we can use both write and finish methods dynamically - see [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ae3b46d945658b43375854fc6549eb33). > > If we want to do any kind of streaming, we're back to the same difficulties. > > An iterator / stream can compute the next batch on demand Uffh I'd need to restructure the whole program to support that :) > > so we need to introduce another higher-level trait. > > Or you can just define your own trait over the writers... That's what I'm doing now and it's sad that my own trait is so close to existing one and I have to reimplement basically the same things. -- 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]
