New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-14875: [C++] C Data Interface: check imported buffer for non-null #14814
GH-14875: [C++] C Data Interface: check imported buffer for non-null #14814
Conversation
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format?
or
In the case of old issues on JIRA the title also supports:
See also: |
@zeroshade @alippai @alamb @viirya @tustvold Would it be easy to try this against the Go and Rust Arrow implementations? |
Sorry @pitrou I am not sure how to test this against Rust. Did you have anything specific have in mind beyond the existing integration CI check https://github.com/apache/arrow/actions/runs/3595507889/jobs/6055082178 ? |
@alamb AFAIR there are Rust-PyArrow integration tests through the C Data Interface, no? |
@wjones127 That would probably work, yes. |
I added tests here: apache/arrow-rs#3276 And locally tested them against PyArrow built from this branch. All tests pass 👍 |
@pitrou I'll build a pyarrow off this branch and test a roundtrip of an empty array between pyarrow and Go via C data. I'll comment again after I set it up. |
@pitrou when I do round trips of the empty arrays, after fixing the crash in Go, I run into a few issues with pyarrow upon importing the empty array from C: The data types:
I also ran into other cases where it through an error in |
@zeroshade Nice catch, can you open an issue? |
The C data interface may expose null data pointers for zero-sized buffers. Make sure that all buffer pointers remain non-null internally. Followup to apacheGH-14805.
9599051
to
e67c687
Compare
@zeroshade This draft PR now passes the uncommented Go tests (assuming you install the corresponding PyArrow version). |
|
@pitrou if this passes the tests now, would it make sense to uncomment them in this PR? Or should we do that in a separate PR? |
@zeroshade We can't uncomment them until a PyArrow wheel is released that incorporates the fix, AFAIU. |
@paleolimbot FYI |
Benchmark runs are scheduled for baseline = 627caf3 and contender = 7319250. 7319250 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
The C data interface may expose null data pointers for zero-sized buffers.
Make sure that all buffer pointers remain non-null internally.
Followup to GH-14805