You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/09 23:50:00 UTC
[jira] [Commented] (ARROW-2423) [Python] PyArrow datatypes raise
ValueError on equality checks against non-PyArrow objects
[ https://issues.apache.org/jira/browse/ARROW-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431509#comment-16431509 ]
ASF GitHub Bot commented on ARROW-2423:
---------------------------------------
andygrove opened a new pull request #1871: ARROW-2423: [Rust] Add Builder.push_slice(&[T])
URL: https://github.com/apache/arrow/pull/1871
This PR also fixes another instance of memory not being released.
----------------------------------------------------------------
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:
users@infra.apache.org
> [Python] PyArrow datatypes raise ValueError on equality checks against non-PyArrow objects
> ------------------------------------------------------------------------------------------
>
> Key: ARROW-2423
> URL: https://issues.apache.org/jira/browse/ARROW-2423
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.9.0
> Environment: Mac OS High Sierra
> PyArrow 0.9.0 (py36_1)
> Python 3.6.3
> Reporter: Dave Challis
> Priority: Minor
> Labels: pull-request-available
>
> Checking a PyArrow datatype object for equality with non-PyArrow datatypes causes a `ValueError` to be raised, rather than either returning a True/False value, or returning [NotImplemented|https://docs.python.org/3/library/constants.html#NotImplemented] if the comparison isn't implemented.
> E.g. attempting to call:
> {code:java}
> import pyarrow
> pyarrow.int32() == 'foo'
> {code}
> results in:
> {code:java}
> Traceback (most recent call last):
> File "types.pxi", line 1221, in pyarrow.lib.type_for_alias
> KeyError: 'foo'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File "t.py", line 2, in <module>
> pyarrow.int32() == 'foo'
> File "types.pxi", line 90, in pyarrow.lib.DataType.__richcmp__
> File "types.pxi", line 113, in pyarrow.lib.DataType.equals
> File "types.pxi", line 1223, in pyarrow.lib.type_for_alias
> ValueError: No type alias for foo
> {code}
> The expected outcome for the above would be for the comparison to return `False`, as that's the general behaviour for comparisons between objects of different types (e.g. `1 == 'foo'` or `object() == 12.4` both return `False`).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)