[teiid-issues] [JBoss JIRA] (TEIID-2787) Correlated grouping expression not properly replaced in pushdown subquery
Steven Hawkins (JIRA)
issues at jboss.org
Mon Dec 30 22:15:33 EST 2013
[ https://issues.jboss.org/browse/TEIID-2787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins updated TEIID-2787:
----------------------------------
Description:
A correlated grouping expression appears in the pushdown query with the internal group name anon_grpX rather than the proper reference from the outer query.
For example the user query:
select x, (select avg\(y) from tbl1 where x = tbl2.x) from tbl2 group by x
would have
where x = anon_grp0.x
was:
A correlated grouping expression appears in the pushdown query with the internal group name anon_grpX rather than the proper reference from the outer query.
For example the user query:
select x, (select avg(y) from tbl1 where x = tbl2.x) from tbl2 group by x
would have
where x = anon_grp0.x
Workaround Description:
Use an inline view to correlated on a projected column. For example rather than:
select x, (select avg\(y) from tbl1 where x = tbl2.x) from tbl2 group by x
use:
select x, (select avg\(y) from tbl1 where x = v.x) from (select x from tbl2 group by x) as v
was:
Use an inline view to correlated on a projected column. For example rather than:
select x, (select avg(y) from tbl1 where x = tbl2.x) from tbl2 group by x
use:
select x, (select avg(y) from tbl1 where x = v.x) from (select x from tbl2 group by x) as v
> Correlated grouping expression not properly replaced in pushdown subquery
> -------------------------------------------------------------------------
>
> Key: TEIID-2787
> URL: https://issues.jboss.org/browse/TEIID-2787
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.7
>
>
> A correlated grouping expression appears in the pushdown query with the internal group name anon_grpX rather than the proper reference from the outer query.
> For example the user query:
> select x, (select avg\(y) from tbl1 where x = tbl2.x) from tbl2 group by x
> would have
> where x = anon_grp0.x
--
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