Details
-
Work Item
-
Resolution: Done
-
Minor
-
None
-
All
-
GreenHopper Ranking:0|i23l5n:
-
9223372036854775807
-
Small
Description
Currently Equals record1.equal(record2) returns false even if schema and values are the same.
Maybe we hsould add @EqualsAndHashCode on RecordImpl.
Please first identify potential side effects (ex: Set<Record> ).
Comment in retro :
What i wanted to solve: On workday, i want to ensure XML -> Record & Json -> Record lead to identical result if XML & Json source are similar. Pb i faced: For rec1 & rec2 Record instances :Objects.equals(rec1, rec2) always return false even if they have same schema and equals values. So, my Assertions.equals(rec1, rec2) is always false. What i proposed: Add @EqualsAndHashCode annotation on RecordImpl and AvroRecord classes (SchemaImpl and AvroSchema already have @Data which include @EqualsAndHashCode). Risks : rec1.equals(rec2) will return true if records have same values but are not same instance. So, if existing pipeline already use equals want to distinct instances, it won't