Github user walterddr commented on a diff in the pull request: https://github.com/apache/flink/pull/5070#discussion_r153566048 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperators.scala --- @@ -188,13 +188,6 @@ object ScalarOperators { (leftTerm, rightTerm) => s"java.util.Arrays.equals($leftTerm, $rightTerm)" } } - // map types - else if (isMap(left.resultType) && - left.resultType.getTypeClass == right.resultType.getTypeClass) { - generateOperatorIfNotNull(nullCheck, BOOLEAN_TYPE_INFO, left, right) { - (leftTerm, rightTerm) => s"java.util.Map.equals($leftTerm, $rightTerm)" --- End diff -- I tried to use this but this is an exact object match, which is very different from `Array.equals`, which is indexed element match. so there's a problem here: 1. an object referred on both the left and right hand side originally might become different object depending on the ser/deser (and they still represent the same Map); 2. if two Map objects with exact same key and value pairs, they should be considered equal, however they are not equal under object match; 3. it is also a debate on whether `Map` should be considered as ordered or unordered map. I think this worth another PR to address.
---