judahrand commented on issue #43985:
URL: https://github.com/apache/arrow/issues/43985#issuecomment-2424695945

   > An object being equal to itself seems reasonable, no matter the value 
stored inside?
   
   I disagree. For an explicit `.equals` method I would expect the result to be 
the same whether the Python object is the same or if the object is a copy. This 
is not the current behaviour:
   
   ```python
   >>> import pyarrow as pa
   >>> table_1 = pa.Table.from_pydict({"foo": [0.1]})
   >>> table_2 = pa.Table.from_pydict({"foo": [0.1]})
   >>> table_1.equals(table_2)
   True
   ```python
   >>> table_1 = pa.Table.from_pydict({"foo": [float("nan")]})
   >>> table_2 = pa.Table.from_pydict({"foo": [float("nan")]})
   >>> table_1.equals(table_2)
   False
   >>> table_1.equals(table_1)
   True
   ```
   
   It feels really weird and unexpected to me for `.equals` to behave 
differently depending on the _contents_ on the table. 


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