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

Alex Hagerman commented on ARROW-640:
-------------------------------------

Sounds good. Just to verify Integer only or Number types in general? I've got a 
deployment happening during the day right now, so I'll hopefully be able to 
wrap up a version one this weekend and do a PR for review.

You mentioned for items like StructValue the as_py fallback won't work. 
Similarly with ListValue I would expect both of these to raise a TypeError: 
Unhashable Type, but I'll check the current behavior. Depending on what that is 
do you have any thoughts if the hash() TypeError should be raised on mutable 
types like standard python behavior? Wanted to check so I don't conflict with 
existing expected behavior if this has been handled previously and to look at 
tying it in with __eq__.

> [Python] Arrow scalar values should have a sensible __hash__ and comparison
> ---------------------------------------------------------------------------
>
>                 Key: ARROW-640
>                 URL: https://issues.apache.org/jira/browse/ARROW-640
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Miki Tebeka
>            Assignee: Alex Hagerman
>            Priority: Major
>             Fix For: 0.10.0
>
>
> {noformat}
> In [86]: arr = pa.from_pylist([1, 1, 1, 2])
> In [87]: set(arr)
> Out[87]: {1, 2, 1, 1}
> In [88]: arr[0] == arr[1]
> Out[88]: False
> In [89]: arr
> Out[89]: 
> <pyarrow.array.Int64Array object at 0x7f8c8c739e08>
> [
>   1,
>   1,
>   1,
>   2
> ]
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to