[
https://issues.apache.org/jira/browse/ARROW-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17659368#comment-17659368
]
Rok Mihevc commented on ARROW-2341:
-----------------------------------
This issue has been migrated to [issue
#18290|https://github.com/apache/arrow/issues/18290] on GitHub. Please see the
[migration documentation|https://github.com/apache/arrow/issues/14542] for
further details.
> [Python] pa.union() mode argument unintuitive
> ---------------------------------------------
>
> Key: ARROW-2341
> URL: https://issues.apache.org/jira/browse/ARROW-2341
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Python
> Affects Versions: 0.9.0
> Reporter: Antoine Pitrou
> Assignee: Antoine Pitrou
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.10.0
>
>
> {code:python}
> >>> pa.union([pa.field('x', pa.int16())], 'sparse')
> UnionType(union[dense]<x: int16=0>)
> >>> pa.union([pa.field('x', pa.int16())], 'dense')
> UnionType(union[dense]<x: int16=0>)
> >>> pa.union([pa.field('x', pa.int16())], 42)
> UnionType(union[dense]<x: int16=0>)
> {code}
> I would suggest allowing "sparse" and "dense" strings as aliases to the
> internal enum values, and disallowing everything else.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)