]
Mark Addleman updated TEIID-1991:
---------------------------------
Attachment: simplified_plan.txt
This is a simplified example of the problem
GROUP BY pushdown into subselect of UNIONs
------------------------------------------
Key: TEIID-1991
URL:
https://issues.jboss.org/browse/TEIID-1991
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.7
Reporter: Mark Addleman
Assignee: Steven Hawkins
Attachments: plan.txt, plan.txt, simplified_plan.txt
If have a query of the form
SELECT a FROM (
SELECT a FROM (
SELECT a FROM ds.t1
) u
) t GROUP BY a
Teiid correctly optimizes the inner SELECT to SELECT 1 FROM ds.t1. However, if the inner
subselect is a union:
SELECT a FROM (
SELECT a FROM (
SELECT a FROM ds.t1 UNION
SELECT a FROM ds.t2
) u
) t GROUP BY a
Teiid does not optimize to
SELECT 1 FROM ds.t1 UNION
SELECT 1 FROM ds.t2
as I would expect.
See attached plan
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: