forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-37056: [Java] Fix importing an empty data array from c-data (a…
…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 <[email protected]> Co-authored-by: Jacek Stania <[email protected]> Co-authored-by: David Li <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
- Loading branch information
Showing
4 changed files
with
79 additions
and
29 deletions.
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
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