You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++] winsorize on a sliced array ignores the offset: wrong rows come out null #51224
pyarrow.compute.winsorize on an array with a non-zero offset returns nulls at positions that hold
values and values at positions that are null, even with limits of 0.0 and 1.0, which should return
the input unchanged. The same values in an array with offset 0 come back unchanged.
pyarrow 25.0.1, Python 3.13.9, macOS 26.6 (arm64), wheel from PyPI.
The null pattern of the sliced result, [valid, valid, null, valid, null], is the parent's validity
bitmap read from bit 0 (flat[0..5] = valid, valid, null, valid, null) rather than from bit 2.
Expected behavior
winsorize(sliced, 0.0, 1.0) returns [None, 4.0, None, 6.0, 7.0], the same as for the copy.
Activity
Upstream tracker: winsorize offset filed as apache/arrow#51224
apacheGH-51224: [C++] Share the validity bitmap when the input is not…
apacheGH-51224: [C++] Apply clang-format
apacheGH-51224: [C++] Clear the output offset when winsorizing
Upstream tracker: apache/arrow#51224 has a fix pull request from a co…
apacheGH-51224: [C++] Reuse the bitmap helper in winsorize
apacheGH-51224: [C++] Keep the correct nulls when winsorizing a slice…
apacheGH-51224: [C++] Share the validity bitmap when the input is not…
apacheGH-51224: [C++] Apply clang-format
apacheGH-51224: [C++] Clear the output offset when winsorizing
apacheGH-51224: [C++] Reuse the bitmap helper in winsorize
apacheGH-51224: [C++] Preserve sliced null and NaN-only arrays
apacheGH-51224: [C++] Keep the correct nulls when winsorizing a slice…
apacheGH-51224: [C++] Share the validity bitmap when the input is not…
apacheGH-51224: [C++] Apply clang-format
2 remaining items
apacheGH-51224: [C++] Preserve sliced null and NaN-only arrays
apacheGH-51224: [C++] Keep the correct nulls when winsorizing a slice…
apacheGH-51224: [C++] Share the validity bitmap when the input is not…
apacheGH-51224: [C++] Apply clang-format
apacheGH-51224: [C++] Clear the output offset when winsorizing
apacheGH-51224: [C++] Reuse the bitmap helper in winsorize
apacheGH-51224: [C++] Preserve sliced null and NaN-only arrays
GH-51224: [C++] Keep the correct nulls when winsorizing a sliced array (
pitrou commentedon Sep 28, 2026
Issue resolved by pull request 51251
#51251
pitrou commentedon Sep 28, 2026
@1fanwang Can you post here so that we assign this issue to you?
1fanwang commentedon Sep 28, 2026
take
1fanwang commentedon Sep 28, 2026
Posted a comment, thanks @pitrou