[
https://issues.apache.org/jira/browse/ARROW-15050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joris Van den Bossche updated ARROW-15050:
------------------------------------------
Summary: [Python] pyarrow.scalar doesn't accept nested pyarrow values
(was: pyarrow.scalar doesn't accept nested pyarrow values)
> [Python] pyarrow.scalar doesn't accept nested pyarrow values
> ------------------------------------------------------------
>
> Key: ARROW-15050
> URL: https://issues.apache.org/jira/browse/ARROW-15050
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Reporter: Vlad Firoiu
> Priority: Major
>
> Easiest explained in code:
> {code:python}
> import pyarrow as pa
> t1 = pa.struct([('x', pa.int64())])
> t2 = pa.struct([('y', t1)])
> t1_py = {'x', 0}
> t1_pa = pa.scalar(t1_py, type=t1)
> t2_py = {'y': {'x': 0}}
> t2_pa = pa.scalar(t2_py, type=t2) # works
> t2_mixed = {'y': t1_pa}
> t2_pa_mix = pa.scalar(t2_mixed, type=t2) # fails
> assert t2_pa_mix == t2_pa
> {code}
> Is there some other way to construct the pyarrow struct value corresponding
> to {{t2_pa}} given {{t1_pa}} directly, without going through python first
> (i.e. constructing {{t1_py}})?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)