[ 
https://issues.apache.org/jira/browse/CALCITE-7689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-7689:
------------------------------------
    Labels: pull-request-available  (was: )

> MAP equality compares maps by insertion order
> ---------------------------------------------
>
>                 Key: CALCITE-7689
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7689
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>
> The runtime implements MAP values as LinkedHashMap. Two such maps are equal 
> only if keys were inserted in the same order. I believe that the SQL 
> semantics would require checking that two maps have the same keys and map 
> these keys to correspondingly equal values:
> {code:java}
> SELECT MAP[1, 2, 3, 4] = MAP[3, 4, 1, 2]; {code}
> should evaluate to TRUE (today it evaluates to FALSE).
> Regarding NULLs, today ARRAY values use IS NOT DISTINCT FROM, so probably MAP 
> equality should use the same semantics (i.e. MAP[1, NULL] = MAP[1, NULL] 
> should evaluate to TRUE and not to UNKNOWN).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to