paddyhoran opened a new pull request #7666: URL: https://github.com/apache/arrow/pull/7666
Most libraries that use `Arrow` are likely to want to define types that produce `RecordBatch`'s. This PR defines the `RecordBatchReader` and `SendableRecordBatchReader` traits and updates other crates (in particular, DataFusion) to use these traits. In short, I think these traits should be defined in the main arrow crate. It was mentioned on the JIRA that we could just use a single trait and allow users to implement `Send`/`Sync` as necessary. The fact the the `schema` method returns a reference counted type makes this hard to do (`Rc` vs `Arc`) so I settled on two different traits. This seemed like the easiest to do in advance of 1.0, maybe we can improve on this. As `next` returns `Arrow`'s error type I added a new variant to allow wrapping external errors once they implement the standard `Error` trait and `Send`, `Sync`. I remove the `PartialEq` and `Clone` bounds on the DataFusion error type as we were only using these in testing (the tests are updates) and it's best to keep the requirements on external implementers as low a possible. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
