You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/13 19:11:50 UTC

[GitHub] [arrow] jorisvandenbossche commented on a change in pull request #7737: ARROW-9445: [Python] Revert Array.equals changes + expose comparison ops in compute

jorisvandenbossche commented on a change in pull request #7737:
URL: https://github.com/apache/arrow/pull/7737#discussion_r453871793



##########
File path: python/pyarrow/table.pxi
##########
@@ -189,6 +185,12 @@ cdef class ChunkedArray(_PandasConvertible):
         """
         return _pc().is_valid(self)
 
+    def __eq__(self, other):
+        try:
+            return self.equals(other)
+        except TypeError:
+            return NotImplemented

Review comment:
       I doubt a bit whether we should add this back (this is from the revert, since ChunkedArray implemented this, while Array did not). Or otherwise we should maybe rather add it like this to Array as well ..
   
   Right now, RecordBatch and Table also have a `__eq__` that dispatches to `equals()`.




----------------------------------------------------------------
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:
users@infra.apache.org