You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Antoine Pitrou (JIRA)" <ji...@apache.org> on 2018/03/22 14:31:00 UTC

[jira] [Created] (ARROW-2341) [Python] pa.union() mode argument unintuitive

Antoine Pitrou created ARROW-2341:
-------------------------------------

             Summary: [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


{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
(v7.6.3#76005)