wjones127 commented on code in PR #3276:
URL: https://github.com/apache/arrow-rs/pull/3276#discussion_r1040091201


##########
arrow-pyarrow-integration-testing/tests/test_sql.py:
##########
@@ -193,6 +200,34 @@ def test_time32_python():
     del b
     del expected
 
+
+def test_empty_array_python():
+    """
+    Python -> Rust -> Python
+    """
+    a = pa.array([], pa.int32())

Review Comment:
   For the null failure, here is the relevant backtrace:
   
   ```
   thread '<unnamed>' panicked at 'assertion failed: index < array.n_buffers as 
usize', /Users/willjones/Documents/arrow-rs/arrow/src/ffi.rs:586:5
   stack backtrace:
      0: rust_begin_unwind
                at 
/rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
      1: core::panicking::panic_fmt
                at 
/rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
      2: core::panicking::panic
                at 
/rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:48:5
      3: arrow::ffi::create_buffer
                at /Users/willjones/Documents/arrow-rs/arrow/src/ffi.rs:586:5
      4: arrow::ffi::ArrowArrayRef::null_bit_buffer
                at /Users/willjones/Documents/arrow-rs/arrow/src/ffi.rs:736:18
      5: arrow::ffi::ArrowArrayRef::to_data
                at /Users/willjones/Documents/arrow-rs/arrow/src/ffi.rs:620:31
      6: arrow::array::ffi::<impl 
core::convert::TryFrom<arrow::ffi::ArrowArray> for 
arrow_data::data::ArrayData>::try_from
                at 
/Users/willjones/Documents/arrow-rs/arrow/src/array/ffi.rs:34:9
      7: <arrow_data::data::ArrayData as 
arrow::pyarrow::PyArrowConvert>::from_pyarrow
                at 
/Users/willjones/Documents/arrow-rs/arrow/src/pyarrow.rs:132:20
   ```



-- 
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