-Re: Does Avro GenericData.Record violate the .equals contract?
Doug Cutting 2012-02-09, 19:49
On 02/09/2012 07:02 AM, Andrew Kenworthy wrote:
> This means that if I have no sorting defined in my schema, that all
> records are treated as being equal to one another.
If you specify "order":"ignore" for all fields in a record, then, yes,
all instances of that record would be equal. I cannot imagine a case
where this would be useful, but I also don't see how this would violate
the equals() contract.
The default for fields is to behave as if "order":"ascending" is
specified. Records are equal if all of their fields that are not
specified as "order":"ignore" are equal.