You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Hyoungjun Kim (JIRA)" <ji...@apache.org> on 2014/07/03 20:33:35 UTC

[jira] [Created] (TAJO-903) Left outer join should be optimized by the broadcast join.

Hyoungjun Kim created TAJO-903:
----------------------------------

             Summary: Left outer join should be optimized by the broadcast join.
                 Key: TAJO-903
                 URL: https://issues.apache.org/jira/browse/TAJO-903
             Project: Tajo
          Issue Type: Improvement
            Reporter: Hyoungjun Kim
            Assignee: Hyoungjun Kim
            Priority: Minor


The next query has three small tables and expected broadcast join, but not. 
{code:sql}
select count(*) from large1 
left outer join large2 on large1_id = large2_id
left outer join small1 on large1_id = small1_id
left outer join small2 on large1_id = small2_id
left outer join small3 on large1_id = small3_id
{code}

The next is the upper query's plan.
{noformat}
|-eb_1404411535695_0000_000011
   |-eb_1404411535695_0000_000010
      |-eb_1404411535695_0000_000009 (join)
         |-eb_1404411535695_0000_000008 (small)
         |-eb_1404411535695_0000_000007 (join)
            |-eb_1404411535695_0000_000006 (small)
            |-eb_1404411535695_0000_000005 (join)
               |-eb_1404411535695_0000_000004 (small)
               |-eb_1404411535695_0000_000003 (join)
                  |-eb_1404411535695_0000_000002 (large)
                  |-eb_1404411535695_0000_000001 (large)
{noformat}

Optimized plan should be the next.
{noformat}
|-eb_1404411906426_0000_000005
   |-eb_1404411906426_0000_000004
      |-eb_1404411906426_0000_000003 (broadcast small1, small2, small3)
         |-eb_1404411906426_0000_000002 (large)
         |-eb_1404411906426_0000_000001 (large)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)