[
https://issues.apache.org/jira/browse/CALCITE-4647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-4647.
----------------------------------
Resolution: Duplicate
Marking as duplicate of CALCITE-4590.
I agree that it is a bug. Setting {{shouldConvertRaggedUnionTypesToVarying}} is
only a workaround. If the types are CHAR (i.e. non-varying), trailing spaces
should be ignored, so the {{CHAR(3)}} value "ABC" should compare equal to the
{{CHAR(4)}} value "ABC ".
> 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)