-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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-37056: [Java] Fix importing an empty data array from c-data #37531
Conversation
|
Thanks @janosik47 . Would you also like to add a new test to https://github.com/apache/arrow/blob/main/java/c/src/test/python/integration_tests.py ? |
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.
Java LGTM, I left some nits
java/c/src/test/java/org/apache/arrow/c/ArrowArrayUtilityTest.java
Outdated
Show resolved
Hide resolved
java/c/src/test/java/org/apache/arrow/c/ArrowArrayUtilityTest.java
Outdated
Show resolved
Hide resolved
java/c/src/test/java/org/apache/arrow/c/ArrowArrayUtilityTest.java
Outdated
Show resolved
Hide resolved
java/c/src/test/java/org/apache/arrow/c/ArrowArrayUtilityTest.java
Outdated
Show resolved
Hide resolved
Just to make sure, do you plan on adding the integration tests in this PR, or later? |
hi - I think I will try to add an integration test ...
…On Mon, 4 Sept 2023 at 20:39, David Li ***@***.***> wrote:
Just to make sure, do you plan on adding the integration tests in this PR,
or later?
—
Reply to this email directly, view it on GitHub
<#37531 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJHBBKI6DTDJAXOXYYII26TXYYU57ANCNFSM6AAAAAA4JRCGSA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
For the record, we can help if necessary. |
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.
Thanks a lot @janosik47 for diagnosing and fixing this! Let's wait for CI now.
Hmm, I assume the CI failure on AMD64 Windows Server 2022 Java JDK 11 is unrelated, but I'm not sure. @lidavidm could you perhaps take a look? |
That module shouldn't run any JNI code, so I don't think it relates here, but it should be investigated separately. CC @davisusanibar @danepitkin |
FTR, I ran the same job again on the main branch and it succeeded: |
... all the while it failed 3 times in a row in this PR. So it might deserve investigating before merging? |
…java Co-authored-by: David Li <li.davidm96@gmail.com>
Co-authored-by: David Li <li.davidm96@gmail.com>
b4f50dd
to
2334517
Compare
Ok, I've rebased first to make sure it wasn't due to being based on an old commit. |
Looks like several PRs were failing on this job recently, but is now fixed on main? |
Rebasing fixed it, so I assume some older commits had the issue. Will merge! |
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 5a78169. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them. |
…pache#37531) ### Rationale for this change Fix java lib bug that prevents from importing specific data via c-data interface. Currently an attempt to load a vector with empty data buffer results in an IllegalStateException error. ### What changes are included in this PR? Updated BufferImportTypeVisitor to correctly handle a situation when underlying c-data array pointer is NULL (0) and the expected length of data is zero (0). ### Are these changes tested? Yes, updated the existing unit tests ### Are there any user-facing changes? No * Closes: apache#37056 Lead-authored-by: Jacek Stania <janosik47@gmail.com> Co-authored-by: Jacek Stania <38670505+janosik47@users.noreply.github.com> Co-authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
…pache#37531) ### Rationale for this change Fix java lib bug that prevents from importing specific data via c-data interface. Currently an attempt to load a vector with empty data buffer results in an IllegalStateException error. ### What changes are included in this PR? Updated BufferImportTypeVisitor to correctly handle a situation when underlying c-data array pointer is NULL (0) and the expected length of data is zero (0). ### Are these changes tested? Yes, updated the existing unit tests ### Are there any user-facing changes? No * Closes: apache#37056 Lead-authored-by: Jacek Stania <janosik47@gmail.com> Co-authored-by: Jacek Stania <38670505+janosik47@users.noreply.github.com> Co-authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
Rationale for this change
Fix java lib bug that prevents from importing specific data via c-data interface.
Currently an attempt to load a vector with empty data buffer results in an IllegalStateException error.
What changes are included in this PR?
Updated BufferImportTypeVisitor to correctly handle a situation when underlying c-data array pointer is NULL (0) and the expected length of data is zero (0).
Are these changes tested?
Yes, updated the existing unit tests
Are there any user-facing changes?
No