qsourav opened a new issue, #47862:
URL: https://github.com/apache/arrow/issues/47862

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   The `coalesce` behaviour is unexpected in the following example:
   ```
   >>> import pyarrow as pa
   >>> import pyarrow.compute as pc
   >>> data_buf = pa.py_buffer(np.arange(8, dtype=np.int32))
   >>> null_buf = pa.py_buffer(bytes([0b11110111]))
   >>> a1 = pa.Array.from_buffers(
   ...       type=pa.int32(),
   ...       length=8,
   ...       buffers=[null_buf, data_buf]
   ... )
   >>> print(a1)
   [
     0,
     1,
     2,
     null,
     4,
     5,
     6,
     7
   ]
   >>> a2 = pc.coalesce(a1, pa.scalar(999, type=pa.int32()))
   >>> print(a2)
   [
     0,
     999,
     2,
     3,
     4,
     5,
     6,
     7
   ]
   ```
   
   It mistakenly updated the value at 1th index (where it is supposed to be 
reflected on 4th index due to a null value). The same issue is also experienced 
with tre C++ interface `arrow::compute::CallFunction("coalesce", {...})`.
   
   ※ This is only experienced on Windows (11) platform, not on the Linux 
platform.
   
   Any suggestion/input on this would be highly helpful. Looking forward to 
hearing from you.
   
   P.S. It is working fine with arrow 20.0 (on Windows), but not with arrow 
21.0 (on Windows).
   
   Thanks and Regards,
   Sourav Saha
   
   ### Component(s)
   
   Python


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