Skip to content

[C++][Python] replace_with_mask crashes when null type inputs are used #47447

Description

@renaudb

Describe the bug, including details regarding any error messages, version, and platform.

This was tested with pyarrow 21.0.0 and 20.0.0 and OSX and Linux.

To reproduce:

import pyarrow as pa
import pyarrow.compute as pc

a = pa.array([None], pa.null())
b = pa.array([None], pa.null())
pc.replace_with_mask(a, True, b)

Python exits with:

/Users/runner/work/crossbow/crossbow/arrow/cpp/src/arrow/result.cc:27: Constructed with a non-error status: OK
[1]    79074 abort      python

This was discovered when using pandas combine_first on null series.

import pandas as pd
import pyarrow as pa

pd.Series([None], dtype=pd.ArrowDtype(pa.null())).combine_first(pd.Series([None], dtype=pd.ArrowDtype(pa.null())))

Component(s)

Python

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions