wuchong commented on a change in pull request #12130:
URL: https://github.com/apache/flink/pull/12130#discussion_r425102181



##########
File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/GenericMapData.java
##########
@@ -85,12 +85,15 @@ public boolean equals(Object o) {
                        return false;
                }
                GenericMapData that = (GenericMapData) o;
-               return Objects.equals(map, that.map);
+               return Arrays.deepEquals(map.keySet().toArray(), 
that.map.keySet().toArray()) &&
+                       Arrays.deepEquals(map.values().toArray(), 
that.map.values().toArray());

Review comment:
       Not sure about this. `Arrays.deepEquals` will compare elements in order. 
However, `map.keySet()` doesn't guarentee order. Maybe we can simply use 
`Objects.equals(map, that.map)` here. Because `byte[]` shouldn't be as map key. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to