[ 
https://issues.apache.org/jira/browse/IMPALA-6083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Russell resolved IMPALA-6083.
----------------------------------
       Resolution: Fixed
    Fix Version/s: Impala 2.10.0

Yes, SHA = 3b5a36337f190481cef7ebef398324805d7e4485

I forgot that 'github bot' doesn't apply, so mentioning the JIRA number in the 
commit message doesn't create an obvious linkage.

> Clarify scope of STRAIGHT_JOIN query hint in Impala docs
> --------------------------------------------------------
>
>                 Key: IMPALA-6083
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6083
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Docs
>    Affects Versions: Impala 2.10.0
>            Reporter: Alexander Behm
>            Assignee: John Russell
>            Priority: Major
>             Fix For: Impala 2.10.0
>
>
> The documentation for STRAIGHT_JOIN is missing one very important detail:
> The scope of the hint is limited to the FROM clause of the query block where 
> the hint appears. In particular, the hint does not apply recursively to all 
> subqueries.
> Existing docs are here:
> https://impala.incubator.apache.org/docs/build/html/topics/impala_perf_joins.html
> *Examples*
> 1. The hint here will prevent reordering of "v1" and "v2", but the joins 
> between "t1" and "t2" and "t3" and "t4" can still be reordered.
> {code}
> select /* +straight_join */ count(*) from
> (select t1.id as id from t1 join t2 on t1.id = t2.id) v1
> join
> (select t3.id as id from t3 join t4 on t3.id = t4.id) v2
> on (v1.id = v2.id)
> {code}
> 2. Fully hinted query. No join ordering is applied whatsoever.
> {code}
> select /* +straight_join */ count(*) from
> (select /* +straight_join */ t1.id as id from t1 join t2 on t1.id = t2.id) v1
> join
> (select /* +straight_join */ t3.id as id from t3 join t4 on t3.id = t4.id) v2
> on (v1.id = v2.id)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to