You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was writing a test that checked for the equality of Beam Rows with Maps that have ByteBuffer keys. Row's .equals() method doesn't account for this case.
Although ByteBuffer is used as the map key, Row stores the byte array value instead. There are known issues when using byte[] type as Map key (equality is determined by array identity, so only the exact same byte[] key can be used to retrieve a value. ie, a new identical byte[] will not retrieve any values. Read here for more details).
Issue Priority
Priority: 3 (minor)
Issue Components
Component: Python SDK
Component: Java SDK
Component: Go SDK
Component: Typescript SDK
Component: IO connector
Component: Beam examples
Component: Beam playground
Component: Beam katas
Component: Website
Component: Spark Runner
Component: Flink Runner
Component: Samza Runner
Component: Twister2 Runner
Component: Hazelcast Jet Runner
Component: Google Cloud Dataflow Runner
The text was updated successfully, but these errors were encountered:
ahmedabu98
changed the title
[Bug]: [Java] Hamcrest containsInAnyOrder doesn't recognize Row equality with BYTES
[Bug]: [Java] Row equality not working as expected when ByteBuffer used as Map key
May 15, 2023
What happened?
I was writing a test that checked for the equality of Beam Rows with Maps that have ByteBuffer keys. Row's
.equals()
method doesn't account for this case.To reproduce:
Although ByteBuffer is used as the map key, Row stores the byte array value instead. There are known issues when using
byte[]
type as Map key (equality is determined by array identity, so only the exact same byte[] key can be used to retrieve a value. ie, a new identical byte[] will not retrieve any values. Read here for more details).Issue Priority
Priority: 3 (minor)
Issue Components
The text was updated successfully, but these errors were encountered: