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

Joris Van den Bossche commented on ARROW-18265:
-----------------------------------------------

bq. I think you are referring to this:

Indeed. But so in your code example above, the {{pc.field(0)* 2}} is used to 
refer to the flat list values (the first child field). While the proposal in 
this issue is to have {{pc.field(0)}} mean to select the first element of each 
list value (eg in projections).  
That seems quite a different meaning, and so I am not sure we should use the 
same API for both use cases.



> [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
>              Labels: pull-request-available
>             Fix For: 11.0.0
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> {{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