You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "thswlsqls (via GitHub)" <gi...@apache.org> on 2026/07/08 21:26:57 UTC
[I] [Bug] FunctionChange.UpdateDefinition.hashCode omits name and hashes definition twice [paimon]
thswlsqls opened a new issue, #8515:
URL: https://github.com/apache/paimon/issues/8515
**Search before asking**
- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
**Paimon version**
master @ 0e22fa885 / 2.0-SNAPSHOT
**Compute Engine**
Engine-agnostic (JavaAPI, paimon-api)
**Minimal reproduce step**
`FunctionChange.UpdateDefinition.hashCode()` (paimon-api/src/main/java/org/apache/paimon/function/FunctionChange.java line 302) returns `Objects.hash(definition, definition)`: it hashes `definition` twice and omits `name`. Its own `equals()` compares both `name` and `definition`, and the sibling `AddDefinition.hashCode()` in the same file correctly uses `Objects.hash(name, definition)`.
**What doesn't meet your expectations?**
Two `UpdateDefinition` objects with the same `definition` but different `name` are unequal, yet collide into the same hash code. This degrades hash-based collections (HashMap/HashSet) that key on these objects.
**Anything else?**
N/A
**Are you willing to submit a PR?**
- [x] I'm willing to submit a PR!
--
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: issues-unsubscribe@paimon.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] FunctionChange.UpdateDefinition.hashCode omits name and hashes definition twice [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi closed issue #8515: [Bug] FunctionChange.UpdateDefinition.hashCode omits name and hashes definition twice
URL: https://github.com/apache/paimon/issues/8515
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org