[teiid-issues] [JBoss JIRA] (TEIID-1680) issues with correlation and aggregation

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Mon Mar 12 14:05:47 EDT 2012


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

Steven Hawkins updated TEIID-1680:
----------------------------------

    Workaround Description: 
Use an inline view the project the aggregate expressions as columns.  For example, instead of 
"SELECT (SELECT X FROM Y WHERE Z = MAX(A)) FROM B GROUP BY C"
use
"SELECT (SELECT X FROM Y WHERE Z = MAX_A) FROM (SELECT MAX(A) AS MAX_A FROM B GROUP BY C) AS VW"


  was:
Use an inline view the project the aggregate expressions as columns.  For example, instead of 
"SELECT (SELECT X FROM Y WHERE Z = MAX(A)) FROM B GROUP BY C"
use
"SELECT (SELECT X FROM Y WHERE Z = MAX_A) FROM (SELECT MAX(A) AS MAX_A FROM B GROUP BY C)"



    
> issues with correlation and aggregation
> ---------------------------------------
>
>                 Key: TEIID-1680
>                 URL: https://issues.jboss.org/browse/TEIID-1680
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 7.0
>            Reporter: Steven Hawkins
>            Assignee: Steven Hawkins
>
> subqueries used in the having/select clause of a query with grouping only understand correlated element symbols - not correlated grouping expressions or correlated aggregate values.
> If a nested aggregate contains only outer references, then it should be treated as a correlated value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list