You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2021/06/24 08:00:30 UTC
[jira] [Assigned] (ARROW-13158) [Python] Fix repr and contains of
StructScalar with duplicate field names
[ https://issues.apache.org/jira/browse/ARROW-13158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joris Van den Bossche reassigned ARROW-13158:
---------------------------------------------
Assignee: Joris Van den Bossche
> [Python] Fix repr and contains of StructScalar with duplicate field names
> -------------------------------------------------------------------------
>
> Key: ARROW-13158
> URL: https://issues.apache.org/jira/browse/ARROW-13158
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Python
> Reporter: Joris Van den Bossche
> Assignee: Joris Van den Bossche
> Priority: Major
>
> Broken off from ARROW-9997
> When having duplicate fields, the repr fails:
> {code}
> In [28]: s = pa.scalar([('a', 1), ('b', 2), ('a', 3)], pa.struct([('a', 'int64'), ('b', 'int64'), ('a', 'int64')]))
> In [29]: 0 in s
> Out[29]: True
> In [30]: s
> ....
> KeyError: 'a'
> {code}
> In addition, the contains ({{in}}) operation also shouldn't accept integers (this is also the case for non-duplicate fields)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)