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

   **Describe the bug**
   `arrow::compute::nullif` may panic if the input array is of type 
`DataType::Null`.
   
   **To Reproduce**
   
   ```rust
   assert_eq!(
       as_null_array(
           &nullif(
               &NullArray::new(3),
               &BooleanArray::from(vec![Some(false), Some(true), None]),
           )
           .unwrap()
       ),
       &NullArray::new(3)
   );
   ```
   
   ```
   thread '...' panicked at 'NullArray data should not contain a null buffer, 
as no buffers are required', arrow-array\src\array\null_array.rs:149:9
   stack backtrace:
      0: rust_begin_unwind
                at 
/rustc/864bdf7843e1ceabc824ed86d97006acad6af643/library\std\src/panicking.rs:617:5
      1: core::panicking::panic_fmt
                at 
/rustc/864bdf7843e1ceabc824ed86d97006acad6af643/library\core\src/panicking.rs:67:14
      2: <arrow_array::array::null_array::NullArray as 
core::convert::From<arrow_data::data::ArrayData>>::from
                at ...\arrow-rs\arrow-array\src\array\null_array.rs:149:9
      3: arrow_array::array::make_array
                at ...\arrow-rs\arrow-array\src\array\mod.rs:580:36
      4: arrow_select::nullif::nullif
                at .\src\nullif.rs:96:8
   ```
   
   **Expected behavior**
   Not panicking
   
   **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