[
https://issues.jboss.org/browse/TEIID-1993?page=com.atlassian.jira.plugin...
]
Steven Hawkins updated TEIID-1993:
----------------------------------
Summary: Pushdown GROUP BY/DISTINCT over unions in more situations (was: Pushdown
GROUP BY as DISTINCT when data source does not support inline views)
With Teiid 7.6 the usage of anonymous views to represent grouping made it unnecessary to
use a formal inline view. The first check-in addresses the following situations:
1. Partitioned union with a grouping over the partition - inline views are still
generated, but will be if possible. In theory this is the same case as the query shown in
the forum posting - however at least with 8.1 I did not see the same plan form since the
forum debug plan shows that the union is simply marked as non-all rather than partitioning
the group by. When running the updated code against a similar situation, the result is
that the group by is partitioned and then each of those group bys in turn are removed and
a LIMIT 1 as the grouping is against a constant.
2. Non-partitioned union with aggregates - here we no longer require children to support
inline views (grouping is still required) but group by function is sufficient to account
for non-column reference expressions used as grouping columns.
3. Non-partitioned union without aggregates - arguably this could be treated the same as
2, but the assumption here is that the distinct pushing logic in rule collapse source will
be sufficient. In any case we do know that if the grouping columns do not contain any
expressions then the parent grouping can be removed and the union marked as non-all.
Pushdown GROUP BY/DISTINCT over unions in more situations
---------------------------------------------------------
Key: TEIID-1993
URL:
https://issues.jboss.org/browse/TEIID-1993
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Affects Versions: 7.7
Reporter: Mark Addleman
Assignee: Steven Hawkins
Priority: Minor
Fix For: 8.1
Attachments: pushdown-example.txt
The datasource does not support inline views but does support distinct.
See attached plan and
https://community.jboss.org/message/728556
--
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