gaogaotiantian commented on PR #53113: URL: https://github.com/apache/spark/pull/53113#issuecomment-3551285621
So, the only case it will work is the two objects are the same object ```python type1 = Vector(3) type2 = type1 assert type2 == type1 ``` We can even enforce this by raising an `NotImplementedError` in `__eq__` so it will explicitly ask users to implement their own `__eq__` method - because there's no way we can guarantee the equal comparison. However, it's possible that these proposals are a bit too strict and we want to provide some heuristics to the users. Or we just have to keep some backward compatibility for UDT. Falling back to `DataType` is not too bad - but technically it's not 100% correct. We probably need to think about tradeoff here. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
