You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Uwe L. Korn (JIRA)" <ji...@apache.org> on 2017/11/12 14:17:00 UTC

[jira] [Resolved] (ARROW-1763) [Python] DataType should be hashable

     [ https://issues.apache.org/jira/browse/ARROW-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe L. Korn resolved ARROW-1763.
--------------------------------
    Resolution: Fixed

Issue resolved by pull request 1308
[https://github.com/apache/arrow/pull/1308]

> [Python] DataType should be hashable
> ------------------------------------
>
>                 Key: ARROW-1763
>                 URL: https://issues.apache.org/jira/browse/ARROW-1763
>             Project: Apache Arrow
>          Issue Type: Improvement
>            Reporter: Jeff Reback
>            Assignee: Wes McKinney
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>
> We can then use the DataType objects as keys in dictionary for example. xref https://github.com/ibis-project/ibis/pull/1194#discussion_r148493472
> {code}
> In [1]: import pyarrow as pa
> In [2]: pa.__version__
> Out[2]: '0.7.1'
> In [3]: pa.int8()
> Out[3]: DataType(int8)
> In [4]: hash(pa.int8())
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call last)
> <ipython-input-4-bca0e6e2f6af> in <module>()
> ----> 1 hash(pa.int8())
> TypeError: unhashable type: 'pyarrow.lib.DataType'
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)