LuciferYang opened a new pull request, #13444:
URL: https://github.com/apache/gravitino/pull/13444

   ### What changes were proposed in this pull request?
   
   `TablePO.equals` and `hashCode` now include the seven joined payload fields 
(`format`, `properties`, `partitions`, `sortOrders`, `distribution`, `indexes`, 
`comment`) in the same order, so the PO compares all sixteen fields and the two 
stay mutually consistent.
   
   ### Why are the changes needed?
   
   `equals`/`hashCode` previously covered only the nine `table_info` row 
columns, so two `TablePO`s differing only in payload compared equal. This is a 
completeness fix rather than a contract violation (the two methods were already 
mutually consistent), and no in-tree consumer relies on the old payload-blind 
equality, so there is no behavioral change.
   
   Fix: #13443
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Added `TestTablePO.testEqualsIncludesPayloadColumns` (flipping each payload 
field individually breaks equality) and `testEqualsAndHashCodeConsistent`, with 
a fully populated builder guarded so no field is left null. They fail against 
the pre-fix code.
   


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