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

ASF GitHub Bot commented on TAJO-1277:
--------------------------------------

Github user hyunsik commented on the pull request:

    https://github.com/apache/tajo/pull/379#issuecomment-74479771
  
    +1
    The patch contains a workaround code which can fix the bug right now.
    
    I have some comments. Your workaround code seems to try to firstly find the 
order of joins whose join types is same. In my opinion, this approach may miss 
some of join order combinations. It may cause sub-optimal join orders in some 
cases. I think that the right way is to improve the findBestPair() to find only 
associative join orders. It would be great if we do it in another jira.


> GreedyHeuristicJoinOrderAlgorithm sometimes wrongly assumes associativity of 
> joins
> ----------------------------------------------------------------------------------
>
>                 Key: TAJO-1277
>                 URL: https://issues.apache.org/jira/browse/TAJO-1277
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: Keuntae Park
>            Assignee: Keuntae Park
>
> It looks like GreedyHeuristicJoinOrderAlgorithm always assumes every joins 
> are associative.
> Following query returns in inaccurate result:
> {code}
> select * FROM
> customer c 
> right outer join nation n on c.c_custkey = n.n_nationkey
> join region r on c.c_custkey = r.r_regionkey;
> {code}
> because GreedyHeuristicJoinOrderAlgorithm changes join order as
> {code}
> select * FROM
> customer c 
> join region r on c.c_custkey = r.r_regionkey
> right outer join nation n on c.c_custkey = n.n_nationkey;
> {code}
> I think getBestPair() should be fixed to avoid wrong join ordering. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to