[ 
https://issues.apache.org/jira/browse/CALCITE-482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17014948#comment-17014948
 ] 

Danny Chen commented on CALCITE-482:
------------------------------------

Actually i have on idea, the current implementation is that only the old root 
node's(A) hints were considered to be copied to the new relational expression, 
if the new relational expression's input(B) is also new (does not come from the 
original sub-tree), the hints are ignored intentionally, because for many cases 
i have on idea where the B comes from. User should take care of that in the 
rule to make the logic correct.

For the sort case, the `Sort` is not a Hintable now , it can not take any valid 
hints.

> Implement SQL and planner hints
> -------------------------------
>
>                 Key: CALCITE-482
>                 URL: https://issues.apache.org/jira/browse/CALCITE-482
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.21.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Danny Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.22.0
>
>          Time Spent: 8h 10m
>  Remaining Estimate: 0h
>
> Query optimizer can never be perfect, so it makes sense to implement hints to 
> allow user better control the execution.
> For instance: "never merge this subquery with others" (`/+ no_merge/`), 
> "treat those tables as leading ones" (`/*+ leading */`), etc.
> Hints would enable predictable performance and the planning time would be 
> improved as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to