[
https://issues.apache.org/jira/browse/TRAFODION-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hans Zeller resolved TRAFODION-2130.
------------------------------------
Resolution: Fixed
Fix Version/s: 2.1-incubating
Fix checked in with https://github.com/apache/incubator-trafodion/pull/624 on
7/29/16.
> Incorrect subquery transformation for tables w/o key
> ----------------------------------------------------
>
> Key: TRAFODION-2130
> URL: https://issues.apache.org/jira/browse/TRAFODION-2130
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: 1.2-incubating
> Reporter: Hans Zeller
> Assignee: Hans Zeller
> Fix For: 2.1-incubating
>
>
> Some of the subquery unnesting transformations rely on a unique key on the
> result of the main query. It turns out, however, that the transformation
> happens even if there is no unique key. Example:
> select *
> from (values (1,1), (1,1), (2,2)) T(a,b)
> where t.a in (select max(a)
> from (values (1,1), (1,1), (3,3)) S(a,b)
> where S.b = T.b);
> This should return two rows, but it actually just returns one, because it
> does not include a unique key for the main query, T.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)