Search before asking
Paimon version
master @ 0e22fa8 / 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?
Search before asking
Paimon version
master @ 0e22fa8 / 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) returnsObjects.hash(definition, definition): it hashesdefinitiontwice and omitsname. Its ownequals()compares bothnameanddefinition, and the siblingAddDefinition.hashCode()in the same file correctly usesObjects.hash(name, definition).What doesn't meet your expectations?
Two
UpdateDefinitionobjects with the samedefinitionbut differentnameare 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?