-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-8386: [Python] Fix error when pyarrow.jvm gets an empty vector
When `pyarrow.jvm` gets an empty Vector from the JVM, the buffer list returned is empty and then fails with a `ValueError` in `pa.Array.from_buffers` because it still expects a list populated with buffers. This change checks if the JVM vector has a value count of 0, then manually creates an empty pyarrow Array of the same type. Closes #6889 from BryanCutler/python-jvm-empty-array-ARROW-8386 Authored-by: Bryan Cutler <cutlerb@gmail.com> Signed-off-by: Bryan Cutler <cutlerb@gmail.com>
- Loading branch information
1 parent
3ff0c18
commit 712b8f2
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters