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:10:03 UTC

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

jorisvandenbossche opened a new pull request #7737:
URL: https://github.com/apache/arrow/pull/7737


   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on a change in pull request #7737:
URL: https://github.com/apache/arrow/pull/7737#discussion_r453933109



##########
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:
       OK, updated 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:
users@infra.apache.org



[GitHub] [arrow] wesm closed pull request #7737: ARROW-9445: [Python] Revert Array.equals changes + expose comparison ops in compute

Posted by GitBox <gi...@apache.org>.
wesm closed pull request #7737:
URL: https://github.com/apache/arrow/pull/7737


   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
wesm commented on pull request #7737:
URL: https://github.com/apache/arrow/pull/7737#issuecomment-657805341


   +1. I removed the "_raises" from the unit test name. Merging this


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7737:
URL: https://github.com/apache/arrow/pull/7737#issuecomment-657742505


   https://issues.apache.org/jira/browse/ARROW-9445


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
wesm commented on a change in pull request #7737:
URL: https://github.com/apache/arrow/pull/7737#discussion_r453912928



##########
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 think adding it to Array for consistency sounds good




----------------------------------------------------------------
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