dianaclarke commented on a change in pull request #9738:
URL: https://github.com/apache/arrow/pull/9738#discussion_r596042150
##########
File path: python/pyarrow/tests/test_table.py
##########
@@ -271,7 +271,9 @@ def ne(xarrs, yarrs):
eq([a, c], [d])
ne([c, a], [a, c])
- assert not pa.chunked_array([], type=pa.int32()).equals(None)
+ # ARROW-4822
+ with pytest.raises(AttributeError):
+ pa.chunked_array([], type=pa.int32()).equals(None)
Review comment:
This is a behaviour change though.
Before:
```
>>> import pyarrow
>>> table = pyarrow.chunked_array([], type=pyarrow.int32())
>>> table is None
False
>>> table == None
False
```
After:
```
>>> import pyarrow
>>> table = pyarrow.chunked_array([], type=pyarrow.int32())
>>> table is None
False
>>> table == None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyarrow/table.pxi", line 187, in pyarrow.lib.ChunkedArray.__eq__
return self.equals(other)
File "pyarrow/table.pxi", line 212, in pyarrow.lib.ChunkedArray.equals
CChunkedArray* other_arr = other.chunked_array
AttributeError: 'NoneType' object has no attribute 'chunked_array'
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]