viirya opened a new issue, #5391:
URL: https://github.com/apache/arrow-rs/issues/5391

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   
   We encountered an error when exchanging string array from Java to Rust 
through Arrow C data interface. At Rust side, it complains that the buffer at 
position 1 (offset buffer) is null. After tracing down and some debugging, it 
looks like the issue is Java Arrow `BaseVariableWidthVector` class assigns an 
empty offset buffer if the array is empty (value count 0).
   
   First, I thought it is a bug at Java Arrow 
(https://github.com/apache/arrow/pull/40043). But given some additional context:
   
   https://lists.apache.org/thread/w7g1zfqrjxx0bvrct0mt5zwxvdnc9nob
   https://github.com/apache/arrow-rs/issues/1620
   
   Looks like Arrow allows empty offsets.
   
   This is how we did in `ArrayData`.
   
   So for ffi, we probably need to make it able to consume variable layout 
arrays with empty offset.
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to