rok commented on PR #48085:
URL: https://github.com/apache/arrow/pull/48085#issuecomment-3521237569

   > I think the current scope is solid. I am thinking of basic comparisons and 
the discussion in the issue around `__eq__`. That would also be good to tackle 
but maybe as a separate PR?
   
   I think we already have `__eq__`: 
https://github.com/apache/arrow/pull/7737/files.
   
   > One comment after looking at the code would be to add tests that cover 
various type combinations (array, scalar, Python types, unsupported types ...)
   
   That's a good point, `__eq__` currently raises if the types of compared 
don't match. Good test coverage would also help find edge cases.
   
   ```python
       def __eq__(self, other):
           try:
               return self.equals(other)
           except TypeError:
               # This also handles comparing with None
               # as Array.equals(None) raises a TypeError.
               return NotImplemented
   ```


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to