apache / apache/arrow

[R] array_to_vector() lacks coverage for several core Arrow types

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

Description

### Describe the enhancement requested

The R conversion path in `r/src/array_to_vector.cpp` does not currently handle several built-in Arrow types that exist in the C++ type system.

Core types missing from `Converter::Make()`:

- `STRING_VIEW`
- `BINARY_VIEW`
- `LIST_VIEW`
- `LARGE_LIST_VIEW`
- `RUN_END_ENCODED`
- `SPARSE_UNION`
- `DENSE_UNION`
- `INTERVAL_MONTHS`
- `INTERVAL_DAY_TIME`
- `INTERVAL_MONTH_DAY_NANO`

Note: extension types like `UUID`, `JSON`, `BOOL8`, `OPAQUE`, and `FIXED_SHAPE_TENSOR` are already handled generically via the `Type::EXTENSION` converter path.

Concrete example:
- Converting a `dictionary` column to R currently errors with:
`cannot handle Array of type `

I am working on `STRING_VIEW` separately because it shows up in Polars interop, but this issue is to track the broader missing-type coverage.

The likely resolution is not identical for every type:
- Some should convert directly to an R representation (e.g. view types can cast to their non-view equivalents)
- Some may need new R-side representations (e.g. intervals, unions)
- Some may need to error explicitly with an informative message if there is no sensible R mapping

### Component(s)

R

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.