You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by Francois Saint-Jacques <fs...@gmail.com> on 2019/01/09 18:02:57 UTC
Datum API
Is there a reason why Datum::ARRAY stores an ArrayData and not an Array?
I'm aware there's the `make_array` method to obtain the equivalent, but was
wondering if there was a deeper reason.
Re: Datum API
Posted by Wes McKinney <we...@gmail.com>.
Not a compelling reason -- it was perhaps a premature optimization to
avoid boxing and unboxing costs as the kernel APIs are more likely to
work with ArrayData consistently than the boxed types. The internal
data representation of the default RecordBatch is unboxed ArrayData
rather than boxed (i.e. one of the arrow::Array box types):
https://github.com/apache/arrow/blob/master/cpp/src/arrow/record_batch.cc#L155
On Wed, Jan 9, 2019 at 12:03 PM Francois Saint-Jacques
<fs...@gmail.com> wrote:
>
> Is there a reason why Datum::ARRAY stores an ArrayData and not an Array?
> I'm aware there's the `make_array` method to obtain the equivalent, but was
> wondering if there was a deeper reason.