jorgecarleitao / arrow2

Transmute-free Rust library to work with the Arrow format
Apache License 2.0
1.07k stars 223 forks source link

Allows to use wrappers other than Box to build ArrowArrayStreamReader. #1500

Closed Qqwy closed 1 year ago

Qqwy commented 1 year ago

Before, only Box was supported by ArrowArrayStreamReader.

This PR enables support for ArrowArrayStreams which are:

This is especially important when we receive a *mut ArrowArrayStream from C (or anywhere else outside of Rust) as it will need to be cleaned up in the correct way, so a normal Box does not cut it.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02 :warning:

Comparison is base (fb5e4d5) 83.61% compared to head (e6f66d2) 83.60%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1500 +/- ## ========================================== - Coverage 83.61% 83.60% -0.02% ========================================== Files 388 388 Lines 41910 41910 ========================================== - Hits 35043 35038 -5 - Misses 6867 6872 +5 ``` | [Impacted Files](https://app.codecov.io/gh/jorgecarleitao/arrow2/pull/1500?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao) | Coverage Δ | | |---|---|---| | [src/ffi/stream.rs](https://app.codecov.io/gh/jorgecarleitao/arrow2/pull/1500?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2ZmaS9zdHJlYW0ucnM=) | `67.80% <100.00%> (ø)` | | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/jorgecarleitao/arrow2/pull/1500/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Qqwy commented 1 year ago

@sundy-li The formatter CI pass should now also succeed. :blush: