[
https://issues.apache.org/jira/browse/CALCITE-7689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-7689.
----------------------------------
Fix Version/s: 1.43.0
Assignee: Mihai Budiu
Resolution: Fixed
Fixed in
[https://github.com/apache/calcite/commit/b9686ea14aeab549124cbea51d1b05060aff17c2]
Thank you for the review [~jensen]
> 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
> Assignee: Mihai Budiu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.43.0
>
>
> 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)