Thomas Groh created BEAM-3807:

             Summary: SerializableCoder#structuralValue should be more 
effective for types which don't define an equals method
                 Key: BEAM-3807
             Project: Beam
          Issue Type: Bug
          Components: sdk-java-core
            Reporter: Thomas Groh

Specifically, types which don't implement an equals method (or more loosely, 
types which use the Object equals method) should either implement 
{{#structuralValue}} via using encoded bytes, or require the use of an 
{{Equivalence}} (like the guava definition).


It should always be that the following snippet (or its approximation) returns 

{{<T> expected(Coder<T> myCoder, }}{{T myElement)}}

{{byte[] elementBytes = CoderUtils.serializeToByteArray(myCoder, myElement);}}

{{T decodedFirst = CoderUtils.deserializeFromByteArray(myCoder, elementBytes);}}

{{T decodedSecond = CoderUtils.deserializeFromByteArray(myCoder, 


This message was sent by Atlassian JIRA

Reply via email to