man-group / sparrow

C++20 idiomatic APIs for the Apache Arrow Columnar Format
Apache License 2.0
15 stars 9 forks source link

Provide an "array_view" class #141

Open JohanMabille opened 1 month ago

JohanMabille commented 1 month ago

When typed_array supports different storage types (see #140), an new array_view class should be provided. This class is meant to provide an array API to Arrow data provided by external libraries (via the Arrow C data interface). Notice that this new class should provid a restricted API (only the const API of the array class), since we cannot manage the memory of the external structures.

This array_view will hold a variant of typed_array parmetrized by the ArrowArray storage, while the existing array class will remain unchanged.

Klaim commented 1 month ago

👍🏽 There is a risk that the array_view name leads to misunderstanding, as it would not match "any arrow data storage" but only ArrowArrays. Also we want it to be reduced in capabilities and maybe the name needs to reflect that.

Alex-PLACET commented 1 month ago

array_read_only ?

JohanMabille commented 1 month ago

external_array?