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:28:58 UTC

[PR] [api] Fix FunctionChange.UpdateDefinition.hashCode to include name [paimon]

thswlsqls opened a new pull request, #8518:
URL: https://github.com/apache/paimon/pull/8518

   ### Purpose
   
   fix #8515
   
   - `FunctionChange.UpdateDefinition.hashCode()` returned `Objects.hash(definition, definition)`, hashing `definition` twice and omitting `name`.
   - Its `equals()` compares both `name` and `definition`, so unequal objects (same `definition`, different `name`) collided into one hash bucket, violating the equals/hashCode contract.
   - Fixed to `Objects.hash(name, definition)`, matching the sibling `AddDefinition.hashCode()` in the same file.
   
   ### Tests
   
   - Added `FunctionChangeTest#testUpdateDefinitionHashCodeIncludesName` (same definition, different name -> different hashCode) and `#testUpdateDefinitionEqualsHashCodeConsistency` (equal objects -> equal hashCode), plus `#testAddDefinitionHashCodeIncludesName`.
   - `mvn -pl paimon-api clean install` — all tests passed (FunctionChangeTest: 3 passed).
   


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


Re: [PR] [api] Fix FunctionChange.UpdateDefinition.hashCode to include name [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #8518:
URL: https://github.com/apache/paimon/pull/8518


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