[ 
https://issues.apache.org/jira/browse/FLINK-8151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269092#comment-16269092
 ] 

ASF GitHub Bot commented on FLINK-8151:
---------------------------------------

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.


> [Table] removing map value equality check
> -----------------------------------------
>
>                 Key: FLINK-8151
>                 URL: https://issues.apache.org/jira/browse/FLINK-8151
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: Rong Rong
>            Assignee: Rong Rong
>
> Following up with FLINK-8038. The equality check is not working as Map does 
> not support element-wise equality. Suggest to remove it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to