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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to