[
https://issues.jboss.org/browse/TEIID-2381?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-2381:
---------------------------------------
Can you provide a specific example?
It's easier to illustrate with inline views:
SELECT /\*+ sh ... \*/ col1, col2 FROM (SELECT /\*+ sh ... \*/ col1 FROM t1) as v1,
(SELECT /\*+ sh ... \*/ col2 FROM t2) as v2 WHERE col1 = col2
could be pushed as with the views removed as:
SELECT col1, col2 FROM t1, t2 WHERE col1 = col2
Do we accumulate source hints, or does the top level one take precedence?
Or a scenario like:
SELECT /\*+ sh ... \*/ col1, col2 FROM (SELECT /\*+ sh ... \*/ col1 FROM t1, t2 ...) as
v1, (SELECT /\*+ sh ... \*/ col2 FROM t3, t4 ...) as v2 WHERE col1 = col2
with pushdowns that cross the original view layers (t1 joined with t3 and t2 joined with
t4). Similar restructuring can happen with unions. The main trust here is that the
pre-optimization structure unless other hints to preserve views/joins are used does not
give an indication of the final structure most of the time. That is why the source hint
was originally limited to simple query propagation and mainly targeted at the top-level
query.
Expanded source hint support
----------------------------
Key: TEIID-2381
URL:
https://issues.jboss.org/browse/TEIID-2381
Project: Teiid
Issue Type: Enhancement
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Attachments: HintsExecutionFactory.java, RandomExecutionFactory.java,
RandomNumberStoredProcedureExecution.java, SysviewHintsExecutionTest.java
We currently look at the source hint in only the root user query (not in subqueries nor
the with clause) and only consider it in a very narrow set of circumstances when it's
used in a view.
--
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