Skip to content

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

@thisisnic

Description

@thisisnic

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<values=string_view, indices=uint32> column to R currently errors with:
    cannot handle Array of type <utf8_view>

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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions