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:00 UTC
[jira] [Created] (ARROW-13158) [Python] Fix repr and contains of
StructScalar with duplicate field names
Joris Van den Bossche created ARROW-13158:
---------------------------------------------
Summary: [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
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)