This repository has been archived by the owner on Nov 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the AvroCoder so that it can return true for isDeterministic.
This assumes that AvroCoder uses directBinaryEncoder so Arrays and Maps will be encoded as (number of elements) followed by each elements. They are therefore deterministic if the underlying Array/Collecion/Map is ordered. This deals with several AvroAnnotations: @Stringable: Not deterministic because we know nothing about #toString() @AvroSchema: We aren't sure enough about this to be confident it will lead to deterministic encodings. @AvroEncode: Not deterministic because we know nothing about the encoder. @AvroName: Recognizes that this causes a different field name to be used. This doesn't address the case of GenericRecord or SpecificRecord from a given schema. [] ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=87075588
- Loading branch information
1 parent
7df9cbc
commit a806df8
Showing
3 changed files
with
679 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.