-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add array comparison utility to nanoarrow_testing #577
Comments
This was referenced Aug 5, 2024
paleolimbot
added a commit
that referenced
this issue
Aug 10, 2024
This PR is one possible component to address #577. While in some cases we want a more relaxed comparison that allows (for example) arrays with the same content to be considered equal even if they have different content in null slots, in some cases we really do want an exact match. This PR adds `ArrowArrayViewCompare()` in such a way that the same signature could be used to apply the equality check at a more relaxed validation level when this is implemented in a future PR, but only implements the "identical" level since this is the easiest/most pressing (applies to IPC validation). The messages given by the implementation give the location of the difference but not what the difference actually was. Knowing where the error was is usually sufficient for a higher level runtime (e.g., R, Python, C++) to give a fancier message if they want or need to.
When you've got this implemented, if you get a chance we'd appreciate an issue on the cudf repo indicating that we should update our code! Thank you! |
Will do! (We've only done the easy-but-less-useful-to-you half right now, where we just check for perfectly identical buffers). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are a number of different types of array comparison that have popped up in a number of places depending on the exact needs of the test:
@zeroshade's utility in cudf (I believe this is something like Arrow C++'s "Equal" in that it non-equal buffer values in null slots are still considered equal)
https://github.com/rapidsai/cudf/blob/af57286536fc21b47b80e45be222773b751600c9/cpp/tests/interop/to_arrow_host_test.cpp#L45-L210
@bkietz's
Matcher
to support IPC batch roundtrip testing:A utility comparer with probably terrible failure modes I hacked together (also to support IPC batch roundtrip testing):
Implementation for the integration tests (based on JSON and so is probably not suitable for arbitrary input).
arrow-nanoarrow/src/nanoarrow/integration/c_data_integration.cc
Lines 176 to 198 in f74d57c
The text was updated successfully, but these errors were encountered: