Skip to content

[C++][Compute] Vector replace kernels (replace_with_mask, fill_null) do not support string_view, binary_view, decimal32, or decimal64 #55256

Open

Description

@Awesome06

Describe the bug

The vector replacement compute functions (replace_with_mask, fill_null_forward, and fill_null_backward) fail with arrow::Status::NotImplemented when called on string_view, binary_view, decimal32, or decimal64 arrays.

In cpp/src/arrow/compute/kernels/vector_replace.cc, RegisterVectorFunction registers BaseBinaryTypes(), DECIMAL128, and DECIMAL256, but omits registrations and functors for string/binary views and 32-bit / 64-bit decimals.

Minimal Reproduction

import pyarrow as pa
import pyarrow.compute as pc

# 1. string_view
arr = pa.array(["apple", None, "cherry"], type=pa.string_view())
mask = pa.array([False, True, False])
repl = pa.array(["banana"], type=pa.string_view())

pc.replace_with_mask(arr, mask, repl)
# ArrowNotImplementedError: Function 'replace_with_mask' has no kernel matching input types (string_view, boolean, string_view)

pc.fill_null_forward(arr)
# ArrowNotImplementedError: Function 'fill_null_forward' has no kernel matching input types (string_view)

# 2. decimal32
dec_arr = pa.array([1234, None, 5678], type=pa.decimal32(7, 2))
dec_repl = pa.array([9999], type=pa.decimal32(7, 2))

pc.replace_with_mask(dec_arr, mask, dec_repl)
# ArrowNotImplementedError: Function 'replace_with_mask' has no kernel matching input types (decimal32(7, 2), boolean, decimal32(7, 2))

Expected Behavior

  • replace_with_mask(arr, mask, repl) returns string_view array ["apple", "banana", "cherry"].
  • fill_null_forward(arr) returns string_view array ["apple", "apple", "cherry"].
  • replace_with_mask(dec_arr, mask, dec_repl) returns decimal32(7, 2) array ["12.34", "99.99", "56.78"].

Activity

  1. huong8373tt-beep commented on Oct 26, 2026

    @huong8373tt-beep

    I would like to work on this issue, starting with the decimal32/decimal64 registration gap and verifying whether the view-type support can be safely split into a follow-up if it needs separate buffer-handling machinery.

    I will add focused C++ regression coverage for the supported scope, validate the behavior on current main, and open a PR once the change is ready.

    Disclosure: Slai Agent Runtime is assisting with analysis, implementation, testing, and preparation. The account owner authorizes and reviews the work and takes full responsibility for the submission.

  2. Awesome06 commented on Oct 26, 2026

    @Awesome06
    ContributorAuthor

    Hey @huong8373tt-beep, I am actually working on this issue already.

  3. huong8373tt-beep commented on Oct 26, 2026

    @huong8373tt-beep

    Thanks for letting me know. I will not proceed with a competing implementation. Good luck with the fix.

  4. added a commit that references this issue on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions