[
https://issues.apache.org/jira/browse/TAJO-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14300989#comment-14300989
]
Jihun Kang commented on TAJO-1277:
----------------------------------
How about rewriting logical plan for this case? I feel that rewriting logical
plan like this seems to be more optimal, and lower cost.
{code}
JOIN(8)(INNER)
=> Join Cond: default.c.c_custkey (INT8) = default.n.n_nationkey (INT8)
SCAN(1) on default.nation as n
JOIN(7)(INNER)
=> Join Cond: default.c.c_custkey (INT8) = default.r.r_regionkey (INT8)
SCAN(3) on default.region as r
SCAN(0) on default.customer as c
{code}
> 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
>
> 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)