Add methods pub fn offsets_buffer
, pub fn types_ids_buffer
and pub fn data_buffer
for ArrayDataBuilder
#1640
Labels
pub fn offsets_buffer
, pub fn types_ids_buffer
and pub fn data_buffer
for ArrayDataBuilder
#1640
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently, when users what to create an array by using
ArrayDataBuilder
, they always write code like:The code is not user-friendly and easy to cause some runtime errors. Because:
add_buffer
orbuffers
, users can create arrayData with > 3 buffers, which is harmful.ArrayData::try_new
can not detect such errors. So users have to debug to find it.Describe the solution you'd like
add_buffer
andbuffers
offsets_buffer
,type_ids_buffer
anddata_buffer
null_bit_buffer
andvalidity_buffer
(because it is the name in Apache Arrow Format)ArrayDataBuilder
like:we can add some cheap checking in the
build
method. For exampleThis will introduce some public API changes. So I want more code maintainers to review this issue. And I will implement this if we could reach consensus.
The text was updated successfully, but these errors were encountered: