[teiid-issues] [JBoss JIRA] (TEIID-2381) Expanded source hint support

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Thu Apr 4 15:12:43 EDT 2013


    [ https://issues.jboss.org/browse/TEIID-2381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765084#comment-12765084 ] 

Steven Hawkins commented on TEIID-2381:
---------------------------------------

Mark -

> Other than disambiguating the current syntax as a hint that properly belongs on the Query object rather than the first column object, I think it's separate from the other issues. 

It's two-fold, the primary concern is the placement on subqueries, union branches, with clause items, etc.  The secondary is for sources that support more complicated positional hints, such as a column hint.  The primary is fairly feasible.  Arbitrary positions however are currently not.

>  don't understand your third point or I'm confusing your first and third points. Maybe provide an example illustrating this?

The first and the third are somewhat related.  If you restrict the first to only full queries that presumably are not able to be pushed with the parent, then they can all be associated with their respective push-down.  If you want a hint to appear in a push-down subqueries, that would require additional translator support - e.g. a query and its subquery both have hints and are pushed together - "SELECT /\*+ sh ... \*/ ... (SELECT /\*+ sh ... \*/ ... ) FROM ..." such that the pushdown has both hints.

> the propagation rules can be straightforward 

Ignoring optimization yes.  However the optimizer free for example to remove view layers.  For example if you have two views each with their own source hint and you join them together.  The optimizer removes the view layers and reorders the join.  Where do the hints apply and why?

> I would simply add public Iteratable<String> getSourceHints() to the API

That is one possibility.  The optimizer could just collect all seemingly applicable hints and leave it up to the translator to decide.

 

                
> 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


More information about the teiid-issues mailing list