-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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-38798: [Integration] Enable C Data Interface integration testing on Rust #38799
Conversation
|
return True | ||
|
||
def record_allocation_state(self): | ||
# FIXME is it possible to measure the amount of Rust-allocated memory? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to add your name or an issue ID to this or is it fine to keep it as is in these scripts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can open an issue, though this depends on Rust exposing appropriate primitives:
apache/arrow-rs#5080 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed #38822
raise RuntimeError( | ||
f"Rust C Data Integration call failed: {error}") | ||
finally: | ||
self.dll.arrow_rs_free_error(rs_error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cand self.ffi.string(..)
fail and if that happens is it safe to pass rs_error
to arrow_rs_free_error
in the finally block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unrelated. rs_error
is valid regardless of whether self.ffi.string
fails or not (I suppose it can raise MemoryError if it fails allocating the Python bytestring, though that's highly unlikely).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the function allocating the Rust error string btw:
https://github.com/apache/arrow-rs/blob/df69ef57d055453c399fa925ad315d19211d7ab2/arrow-integration-testing/src/lib.rs#L246-L252
dde5927
to
f0ce845
Compare
Thanks for the review @felipecrv ! I'm going to merge now. |
@tustvold Hopefully this will work fine on the arrow-rs repo. |
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 9a36c42. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
Looks like it might not be quite working - https://github.com/apache/arrow-rs/actions/runs/6954459872/job/18921320582#step:10:1 |
Thank you that seems to have done the trick 👍 |
…ting on Rust (apache#38799) ### Rationale for this change Arrow Rust has added entrypoints for C Data Interface integration testing, so this can now be enabled on our side: apache/arrow-rs#5080 ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: apache#38798 Authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
Rationale for this change
Arrow Rust has added entrypoints for C Data Interface integration testing, so this can now be enabled on our side:
apache/arrow-rs#5080
Are these changes tested?
Yes.
Are there any user-facing changes?
No.