apache / apache/arrow

[C++] Add support for List and LargeList types to replace_with_mask

Open
#50,879 0 comments 0 reactions 1 assignee Claimed by @pratyushadk View on GitHub
Component: C++ Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

Currently, the `replace_with_mask` compute function throws a `NotImplemented` error when called on variable-width list arrays (`ListType` and `LargeListType`).

Given that `replace_with_mask` is broadly useful for data manipulation, it would be great to support variable-size list arrays natively. The implementation can build on the existing `ReplaceMaskImpl` by adding a specialization for list types. It should use `ListBuilder`/`LargeListBuilder` to safely append slices of the child arrays, respecting the variable lengths without directly mutating the offsets.

I've already started working on a C++ implementation for this and plan to submit a PR for it shortly!

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.