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

Krisztian Szucs commented on ARROW-9997:
----------------------------------------

I'd also prefer the mapping API, but {{.as_py()}} should not fail in any 
circumstance. If we keep the mapping API and return with a dict from 
{{.as_py()}}, then it is going to fail if there are duplicate field names. 

If we add a mapping-like interface which tolerates duplicate keys end we 
implement it for both the StructScalar objects and for the one which is 
returned by StructScalar.as_py() then it could work. 

cc [~apitrou]

> [Python] StructScalar.as_py() fails if the type has duplicate field names
> -------------------------------------------------------------------------
>
>                 Key: ARROW-9997
>                 URL: https://issues.apache.org/jira/browse/ARROW-9997
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Krisztian Szucs
>            Assignee: Krisztian Szucs
>            Priority: Major
>             Fix For: 2.0.0
>
>
> {{StructScalar}} currently extends an abstract Mapping interface. Since the 
> type allows duplicate field names we cannot provide that API.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to