You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nicola Crane (Jira)" <ji...@apache.org> on 2022/10/06 11:14:00 UTC
[jira] [Updated] (ARROW-17951) [Python] Support ChunkedArray mask in replace operations
[ https://issues.apache.org/jira/browse/ARROW-17951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicola Crane updated ARROW-17951:
---------------------------------
Summary: [Python] Support ChunkedArray mask in replace operations (was: Support ChunkedArray mask in replace operations)
> [Python] Support ChunkedArray mask in replace operations
> --------------------------------------------------------
>
> Key: ARROW-17951
> URL: https://issues.apache.org/jira/browse/ARROW-17951
> Project: Apache Arrow
> Issue Type: Improvement
> Environment: pyarrow==9.0.0
> python 3.9
> Reporter: &res
> Priority: Minor
>
> Replace operations (more specifically replace_with_mask) don't support chunked array for the mask argument.
> But one would expect that ReplaceMaskChunked, which support chunked array for its input data (the data to be replaced), should also support chunked array for its mask.
>
> {code:java}
> pc.replace_with_mask(pa.array(["a", "b"]), pa.array([True, False]), pa.scalar("c", pa.string()))
> pc.replace_with_mask(
> pa.chunked_array([pa.array(["a", "b"])]),
> pa.array([True, False]),
> pa.scalar("c", pa.string()),
> )
> with pytest.raises(pa.ArrowInvalid, match=r"Mask must be array or scalar, not ChunkedArray"):
> pc.replace_with_mask(
> pa.chunked_array([pa.array(["a", "b"])]),
> pa.chunked_array([pa.array([True, False])]),
> pa.scalar("c", pa.string()),
> ) {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)