avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Does Avro GenericData.Record violate the .equals contract?
Date Thu, 09 Feb 2012 19:49:38 GMT
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.

Doug

Mime
View raw message