[ 
https://issues.apache.org/jira/browse/ARROW-18265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17630176#comment-17630176
 ] 

Miles Granger commented on ARROW-18265:
---------------------------------------

Thanks [~westonpace], that's true, upon initial implementation I am using a 
call to {{list_element}} so good to know I'm on the right path. :) 

I'm aiming to support both variable and fixed size lists, and agree the case of 
a list element not being long enough, ought to return a null.

After updating the {{struct_field}} kernel to deal with lists, it "works" for a 
path specifying a 0 index, ie {{'.path.to.list[0].foo'}} but will fail if it's 
{{'.path.to.list[1].foo'}} because {{FieldRef::FindOne}} doesn't discover 
anything. Suspecting I need to investigate the {{FieldRef::FindAll}} visitor 
implementation, but not 100% sure right now. 

I'll be sure to ping you for a review once I have something worth looking at. 
:-) 

> [C++] Allow FieldPath to work with ListElement
> ----------------------------------------------
>
>                 Key: ARROW-18265
>                 URL: https://issues.apache.org/jira/browse/ARROW-18265
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Miles Granger
>            Assignee: Miles Granger
>            Priority: Major
>             Fix For: 11.0.0
>
>
> {{FieldRef::FromDotPath}} can parse a single list element field. ie. 
> {{{}'path.to.list[0]`{}}}but does not work in practice. Failing with:
> _struct_field: cannot subscript field of type list<....>_
> Being able to add a slice or multiple list elements is not within the scope 
> of this issue. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to