arrow-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes McKinney <>
Subject Re: Accessing nested lists in arrow::Table in c++
Date Tue, 28 Jul 2020 16:02:03 GMT
The list's child array (representing the inner values) can be accessed
with ListArray::values

So cast that to a ListArray

On Tue, Jul 28, 2020 at 10:38 AM Marc Allen <> wrote:
> I'm trying to write a C++ unit test that accesses a populated arrow::Table, where the
table contains a column with a 2-D matrix, i.e. each row has a list(list(double)). I haven't
been able to figure out how to access that data to finish this unit test. I am getting stuck
> auto cmat = table->GetColumnByName("mat");
> auto lmat = std::static_pointer_cast<arrow::ListArray>(cmat->chunk(0))
> // How do I get from the parent ListArray to the child ListArrays?
> I took a look at,
but couldn't quite map it to my use case. Thanks,
> -Marc

View raw message