[
https://issues.apache.org/jira/browse/CALCITE-7678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101128#comment-18101128
]
Mihai Budiu commented on CALCITE-7678:
--------------------------------------
Alright, I will implement ROW comparisons the way the standard mandates them.
One caveat: in postgres the values constructed by ROW(1, 2) and (1, 2) are
actually different types, whereas Calcite interprets both of them as ROW. In
Postgres these compare differently: the ROW types treat NULL = NULL as NULL,
whereas the tuple types treat NULL = NULL as TRUE. But I guess in Calcite ROW,
tuple, and user-defined types all desugar to ROW.
> Runtime equality for ROW values produces incorrect results
> ----------------------------------------------------------
>
> Key: CALCITE-7678
> URL: https://issues.apache.org/jira/browse/CALCITE-7678
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.42.0
> Reporter: Mihai Budiu
> Priority: Minor
>
> GROUP BY, DISTINCT, JOIN, UNION, etc by ROW-typed values produces incorrect
> results, because ROWs are compiled to Object[] and are compared by reference
> instead of being compared by value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)