pitrou commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3197308274

   In https://github.com/apache/arrow/pull/47249#issuecomment-3197027698 I 
added some debug logs for the regression tests. A successful test (for example 
locally on my Linux development machine) prints:
   ```
   pyarrow/tests/test_compute.py::test_fill_null_windows_regression5 
/home/antoine/arrow/dev/cpp/src/arrow/compute/kernels/copy_data_internal.h:102: 
CopyData from array at offset 0 to offset 0 with length 6
   
/home/antoine/arrow/dev/cpp/src/arrow/compute/kernels/copy_data_internal.h:96: 
CopyData from Scalar to offset 5 with length 1
   PASSED
   ```
   
   A failed test on the Windows wheel build prints:
   ```
   _____________________ test_fill_null_windows_regression5 
______________________
       def test_fill_null_windows_regression5():
           ty = pa.int32()
           arr = pa.array([1, 2, 3, 4, 5, None], type=ty)
           s = pa.scalar(42, type=ty)
       
           result = pa.compute.call_function("coalesce", [arr, s])
           expected = pa.array([1, 2, 3, 4, 5, 42], type=ty)
       
   >       assert result.equals(expected)
   E       assert False
   E        +  where False = equals(<pyarrow.lib.Int32Array object at 
0x000001B533DF8BE0>\n[\n  1,\n  2,\n  3,\n  4,\n  5,\n  42\n])
   E        +    where equals = <pyarrow.lib.Int32Array object at 
0x000001B533DF9000>\n[\n  1,\n  42,\n  3,\n  4,\n  5,\n  0\n].equals
   Python313\Lib\site-packages\pyarrow\tests\test_compute.py:1994: 
AssertionError
   ---------------------------- Captured stderr call 
-----------------------------
   C:\arrow\cpp\src\arrow/compute/kernels/copy_data_internal.h:102: CopyData 
from Array at offset 0 to offset 0 with length 6
   C:\arrow\cpp\src\arrow/compute/kernels/copy_data_internal.h:96: CopyData 
from Scalar to offset 1 with length 1
   ```
   
   Isolating the log lines to view the difference:
   * successful:
   ```
   .../arrow/compute/kernels/copy_data_internal.h:102: CopyData from array at 
offset 0 to offset 0 with length 6
   .../arrow/compute/kernels/copy_data_internal.h:96: CopyData from Scalar to 
offset 5 with length 1
   ```
   * failing:
   ```
   .../arrow/compute/kernels/copy_data_internal.h:102: CopyData from Array at 
offset 0 to offset 0 with length 6
   .../arrow/compute/kernels/copy_data_internal.h:96: CopyData from Scalar to 
offset 1 with length 1
   ```
   
   There's something that causes [this 
code](https://github.com/apache/arrow/blob/71a7b5531fd6ef96ce52d04491656031eb023c09/cpp/src/arrow/compute/kernels/scalar_if_else.cc#L2029-L2030)
 to be executed with an incorrect `offset` value.


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to