[
https://issues.apache.org/jira/browse/CALCITE-7901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-7901.
----------------------------------
Fix Version/s: 1.43.0
Resolution: Fixed
Fixed in
[https://github.com/apache/calcite/commit/150d9e6b0b58e0714f0046e0d276cff540d4ee70]
Thank you for the report and fix [~gian]
> UnionMergeRule merges EXCEPT ALL into an enclosing EXCEPT DISTINCT
> ------------------------------------------------------------------
>
> Key: CALCITE-7901
> URL: https://issues.apache.org/jira/browse/CALCITE-7901
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.42.0
> Reporter: Gian Merlino
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.43.0
>
>
> {{CoreRules.MINUS_MERGE}} merges {{Minus(distinct, Minus(all, a, b), c)}}
> into {{Minus(distinct, a, b, c)}}, so the query can return wrong results. For
> example,
> {code:sql}
> select x from (values (1), (1), (2)) as t(x)
> except all
> select x from (values (1)) as t2(x)
> except
> select x from (values (3)) as t3(x)
> {code}
> returns {{[2]}} but should return {{[1], [2]}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)