[Bug] Internal map equality uses Java key lookup for binary keys
Describe the bug
InternalRowUtils.equals compares standalone byte[] values by content, but its InternalMap branch checks keys with Java Map.containsKey and Map.get.
For MAP<BINARY, ...>, two separate byte[] key objects with identical bytes are therefore treated as different keys.
To Reproduce
Compare two GenericMap instances with DataTypes.MAP(DataTypes.BINARY(2), DataTypes.INT()); each map contains one key {1, 2} and value 1, but the key arrays are different objects.
Expected behavior
The maps should compare equal because binary keys have the same logical bytes and values match.
Actual behavior
The maps compare unequal because Java arrays use reference equality for map lookup.
Additional context
The value comparison path already handles byte[] with Arrays.equals; map key comparison should use the same typed equality path.
[Bug] Internal map equality uses Java key lookup for binary keys
Describe the bug
InternalRowUtils.equalscompares standalonebyte[]values by content, but itsInternalMapbranch checks keys with JavaMap.containsKeyandMap.get.For
MAP<BINARY, ...>, two separatebyte[]key objects with identical bytes are therefore treated as different keys.To Reproduce
Compare two
GenericMapinstances withDataTypes.MAP(DataTypes.BINARY(2), DataTypes.INT()); each map contains one key{1, 2}and value1, but the key arrays are different objects.Expected behavior
The maps should compare equal because binary keys have the same logical bytes and values match.
Actual behavior
The maps compare unequal because Java arrays use reference equality for map lookup.
Additional context
The value comparison path already handles
byte[]withArrays.equals; map key comparison should use the same typed equality path.