You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@arrow.apache.org by Yeshwanth Sriram <ye...@icloud.com> on 2021/08/05 16:22:40 UTC
[C++] - Example to extract nested column from table
Hi,
Could someone point me to an example code (C++) to extract nested columns from Arrow/Table (built from parquet) using dot notation in one go?
Looking for something like “auto array = table->GetColumnByName(“a.b.c”)"
Thank you.
Re: [C++] - Example to extract nested column from table
Posted by Neal Richardson <ne...@gmail.com>.
I don't think there's any constraint that says that dots are not valid
column names, so table->GetColumnByName(“a.b.c”) would have to look for a
column called “a.b.c”. But presumably you could instead chain together the
nested extractions like
table->GetColumnByName("a")->GetFieldByName("b")->GetFieldByName("c")
(Note the different method name for StructArrays: see
https://issues.apache.org/jira/browse/ARROW-11424)
Neal
On Mon, Aug 9, 2021 at 11:44 PM Micah Kornfield <em...@gmail.com>
wrote:
> Someone else might chime in but to my knowledge I don't think is
> implemented.
>
> On Thu, Aug 5, 2021 at 9:22 AM Yeshwanth Sriram <ye...@icloud.com>
> wrote:
>
>> Hi,
>>
>> Could someone point me to an example code (C++) to extract nested columns
>> from Arrow/Table (built from parquet) using dot notation in one go?
>>
>> Looking for something like “auto array = table->GetColumnByName(“a.b.c”)"
>>
>> Thank you.
>
>
Re: [C++] - Example to extract nested column from table
Posted by Micah Kornfield <em...@gmail.com>.
Someone else might chime in but to my knowledge I don't think is
implemented.
On Thu, Aug 5, 2021 at 9:22 AM Yeshwanth Sriram <ye...@icloud.com>
wrote:
> Hi,
>
> Could someone point me to an example code (C++) to extract nested columns
> from Arrow/Table (built from parquet) using dot notation in one go?
>
> Looking for something like “auto array = table->GetColumnByName(“a.b.c”)"
>
> Thank you.