You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "rohanjain101 (via GitHub)" <gi...@apache.org> on 2025/07/30 13:24:13 UTC

[I] pa.compute.fill_null produces unexpected result in arrow 21 [arrow]

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

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   Arrow 21:
   
   ```
   >>> z = pa.array([True, False, False, False, False, None])
   >>> z.fill_null(True)
   <pyarrow.lib.BooleanArray object at 0x0000019E1F111720>
   [
     true,
     **true**,
     false,
     false,
     false,
     **false**
   ]
   >>> pa.__version__
   '21.0.0
   ```
   
   Arrow 20:
   ```
   >>> z = pa.array([True, False, False, False, False, None])
   >>> z.fill_null(True)
   <pyarrow.lib.BooleanArray object at 0x00000189726593C0>
   [
     true,
     false,
     false,
     false,
     false,
     true
   ]
   >>> pa.__version__
   '20.0.0'
   >>>
   ```
   
   The result in arrow 21 looks not expected.
   
   ### Component(s)
   
   C++, 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: issues-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3197575166

   In https://github.com/apache/arrow/pull/47360 I've determined that we currently are not able to rebuild our Windows wheel dependencies using vcpkg. This is going to prevent any initiative to move any further on this issue.
   
   (this error popped up for me when I tried to [downgrade MSVC](https://github.com/apache/arrow/pull/47357#issuecomment-3195836642) and also when I tried to [switch to clang-cl](https://github.com/apache/arrow/pull/47359#issuecomment-3197441492)).


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3138366675

   The xsimd PR looks worth investigating. I'm running some crossbow jobs which I'm hope reproduce the error in https://github.com/apache/arrow/pull/47240.
   
   There are some troubling exclusions ([first](https://github.com/xtensor-stack/xsimd/blob/e2a4395f8b278738ed94a6eff94bce5601536e5e/.github/workflows/windows.yml#L25-L32), [second](https://github.com/xtensor-stack/xsimd/blob/e2a4395f8b278738ed94a6eff94bce5601536e5e/.github/workflows/windows.yml#L53)) in xsimd's MSVC workflow related to vector instructions but it's not clear to me if actual calls to xsimd are involved or if the CxxFlags change in that PR could be it.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3195510761

   This may be related to a MSVC compiler optimization bug that surfaced recently:
   https://developercommunity.visualstudio.com/t/SIMD-Code-optimization-bug/10945478?sort=newest
   


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3196161847

   In https://github.com/apache/arrow/pull/47357#issuecomment-3195836642 I tried to change the compiler version but it then fails in the vcpkg build step.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "mdekstrand (via GitHub)" <gi...@apache.org>.
mdekstrand commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3180970356

   I've also just hit this in some changes in progress for LensKit. It appears to be the same bug, although I was working with integer arrays. The `test_arrow_compat` test in lenskit/lkpy#811 has a test for this bug.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3137216532

   I added the Critical Fix and backport-candidate labels here.
   
   Pinging @pitrou @raulcd @AlenkaF @thisisnic @rok  (knowing folks may be out on holidays). I'll try to look later today. It'd be good to get a sense of whether this issue is isolated to fill_null or if it's more broad.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "rohanjain101 (via GitHub)" <gi...@apache.org>.
rohanjain101 commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3293219455

   Is it possible to publish a patch release with this fix, or arrow 22 to be available soon?


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3196156046

   In https://github.com/apache/arrow/pull/47355#issuecomment-3195837876 we see that rebuilding a 20.0.0 wheel does not reproduce the issue.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
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-unsubscribe@arrow.apache.org

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


Re: [I] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "ianmcook (via GitHub)" <gi...@apache.org>.
ianmcook commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3136704306

   Thanks, confirmed I was able to reproduce this incorrect result with PyArrow 21.0.0 installed from PyPI on Windows.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3267154504

   Exciting news: this seems [fixed with MSVC 19.44.35215.0](https://github.com/ursacomputing/crossbow/actions/runs/17554150585/job/49853805929) while it [failed with MSVC 19.43.34809.0](https://github.com/ursacomputing/crossbow/actions/runs/17295339788/job/49092052760). See https://github.com/apache/arrow/pull/47249#issuecomment-3266596153
   
   If this is confirmed, we should still add the regression tests to the PyArrow test suite.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "AntoinePrv (via GitHub)" <gi...@apache.org>.
AntoinePrv commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3187365267

   Hello, pretty new around the Arrow code base (with no access to Windows).
   If I understand correctly, `ByteStreamSplit` being a parquet encoding function, the issue would more likely be with the xsimd version change, correct?


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #47234: [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows
URL: https://github.com/apache/arrow/issues/47234


-- 
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: issues-unsubscribe@arrow.apache.org

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


Re: [I] pa.compute.fill_null produces unexpected result in arrow 21 [arrow]

Posted by "rohanjain101 (via GitHub)" <gi...@apache.org>.
rohanjain101 commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3136597695

   Ok, it repros on windows, but not on linux.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] pa.compute.fill_null produces unexpected result in arrow 21 [arrow]

Posted by "rohanjain101 (via GitHub)" <gi...@apache.org>.
rohanjain101 commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3136556157

   pip install pyarrow==21
   
   I'm using windows.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3293074853

   Issue resolved by pull request 47249
   https://github.com/apache/arrow/pull/47249


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3152913326

   I de-assigned myself since I don't have time this week to look into this further but I think this still needs investigating.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "ianmcook (via GitHub)" <gi...@apache.org>.
ianmcook commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3184613574

   Hi @AntoinePrv @pitrou — it is suspected that this is related to the changes in your PR #46963. Could you take a look please? Thanks.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] pa.compute.fill_null produces unexpected result in arrow 21 [arrow]

Posted by "ianmcook (via GitHub)" <gi...@apache.org>.
ianmcook commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3136474125

   I'm unable to reproduce this after installing PyArrow 21.0.0 from PyPI. How did you build / install PyArrow?


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "nealrichardson (via GitHub)" <gi...@apache.org>.
nealrichardson commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3137084375

   I wonder if #46963 is connected--just looking through what changed in the windows wheel build in the last release and came across that.


-- 
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-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Python] pa.compute.fill_null produces unexpected result in arrow 21 on windows [arrow]

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on issue #47234:
URL: https://github.com/apache/arrow/issues/47234#issuecomment-3293291004

   We release every quarter and Arrow v22 feature freeze is scheduled in a couple of weeks (October's release).
   
   Creating a patch release for Arrow v21 is challenging so late in the release cycle, we have to backport several CI issues to be able to build again and those are not identified.
   
   Could it possible to use Arrow v21 from conda in the meantime until Arrow v22 is available? Another option could be to use a nightly wheel while Arrow v22 is available but those are not official releases and might contain unexpected bugs so I wouldn't recommend to use on production.


-- 
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-unsubscribe@arrow.apache.org

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