[teiid-issues] [JBoss JIRA] (TEIID-2564) Correlated subqueries throws TEIID30328

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Tue Jul 2 12:52:20 EDT 2013


     [ https://issues.jboss.org/browse/TEIID-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins resolved TEIID-2564.
-----------------------------------

    Resolution: Done


The initial fix (in 7.7.1) was not generally correct as the corrected symbol map needed to reference the subquery expression rather than the derived grouping column.
                
> Correlated subqueries throws TEIID30328
> ---------------------------------------
>
>                 Key: TEIID-2564
>                 URL: https://issues.jboss.org/browse/TEIID-2564
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 8.4
>            Reporter: Warren Gibson
>            Assignee: Steven Hawkins
>             Fix For: 8.4.1, 8.5
>
>         Attachments: server.log
>
>
> Non-pushed correlated subqueries that use a correlation variable that is a grouping column where the subquery is turned into a semi join (either through the MJ hint or costing) will fail to find the correlation values.
> For example the following against Netezza (which does not support correlated subqueries):
> SELECT A.INTKEY, A.STRINGNUM FROM BQT1.SMALLA AS A WHERE CONVERT(LONGNUM,
> STRING) = 8 GROUP BY A.INTKEY, A.STRINGNUM HAVING A.STRINGNUM = (SELECT
> MAX(B.STRINGNUM) FROM BQT1.SMALLA AS B WHERE A.INTKEY = B.INTKEY
> throws "TEIID30328 Unable to evaluate A.IntKey: No value was available"
> If the subplan is not converted to a join or the correlated column is not a grouping expression, then there is no issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list