[ 
https://issues.apache.org/jira/browse/ARROW-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409678#comment-16409678
 ] 

ASF GitHub Bot commented on ARROW-2341:
---------------------------------------

pitrou opened a new pull request #1778: ARROW-2341: [Python] Improve pa.union() 
mode argument behaviour
URL: https://github.com/apache/arrow/pull/1778
 
 
   Also:
   - make UnionType.mode return a string ('sparse' or 'dense')
   - make UnionType indexing return fields, not types (like StructType)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [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
>
> {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)

Reply via email to