LuciferYang opened a new issue, #13411: URL: https://github.com/apache/gravitino/issues/13411
**What would you like to be improved?** `ModelVersionEntity.equals` compares `aliases` with `CollectionUtils.isEqualCollection` (order-independent, bag semantics), but `hashCode` hashes the `List` directly, which is order-sensitive. Two model versions that are equal under `equals` but differ only in alias ordering get different hash codes, which violates the `Object.hashCode` contract and loses them in any `HashSet` or `HashMap`. **How should we improve?** Combine an order-independent sum of element hashes for `aliases` into `hashCode`, matching exactly the fields `equals` compares. `uris` and `properties` are `Map`s whose hash is already order-independent, so they stay as they are. -- 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]
