You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2021/06/10 18:25:00 UTC

[jira] [Commented] (CALCITE-4647) intersect returns wrong results

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

Julian Hyde commented on CALCITE-4647:
--------------------------------------

Might be related to CHAR columns from different sides of the INTERSECT having different lengths. There are various bugs logged.

> intersect returns wrong results
> -------------------------------
>
>                 Key: CALCITE-4647
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4647
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: Sean Broeder
>            Priority: Major
>
> select n_nationkey from
>     (select n_nationkey, n_name from 
>         (values (0, 'ALGERIA'), (1, 'ARGENTINA'), (2, 'BRAZIL'), (3, 'CANADA'))
>             as nation(n_nationkey, n_name)
>     intersect
>     select n_nationkey, n_name from 
>         (values (2, 'BRAZIL'), (3, 'CANADA'), (4, 'EGYPT'))
>             as nation2(n_nationkey, n_name))
> should return:
> N_NATIONKEY=2
> N_NATIONKEY=3
> but returns an empty result



--
This message was sent by Atlassian Jira
(v8.3.4#803005)