Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-929

Broadcast join with empty outer join table returns empty result.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      The below query returns empty result. customer_parts table is partitioned table by c_custkey column. Orders table is inner join and customer_parts is outer join.

      select a.l_orderkey, b.o_orderkey, c.c_custkey from lineitem a 
      inner join orders b on a.l_orderkey = b.o_orderkey 
      left outer join customer_parts c on a.l_orderkey = c.c_custkey and c.c_custkey < 0
      

      Repartitioner class doesn't consider mixed join operator(inner and outer). In the upper query case there is three scans stats. customer_parts's stat is zero but customer_parts is outer join.

      JoinNode joinNode = PlannerUtil.findMostBottomNode(execBlock.getPlan(), NodeType.JOIN);
      if (joinNode != null) {
        if ( (joinNode.getJoinType() == JoinType.INNER)) {
          for (int i = 0; i < stats.length; i++) {
            if (stats[i] == 0) {
              return;
            }
          }
        }
      }
      

        Activity

        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-build #287 (See https://builds.apache.org/job/Tajo-master-build/287/)
        TAJO-929: Broadcast join with empty outer join table returns empty result. (Hyoungjun Kim via hyunsik) (hyunsik: rev 329e508caf88b3f75e465581599a255eceabb16a)

        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java
        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinBroadcast.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-build #287 (See https://builds.apache.org/job/Tajo-master-build/287/ ) TAJO-929 : Broadcast join with empty outer join table returns empty result. (Hyoungjun Kim via hyunsik) (hyunsik: rev 329e508caf88b3f75e465581599a255eceabb16a) CHANGES tajo-core/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinBroadcast.java
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/66

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/66
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed.

        Show
        hyunsik Hyunsik Choi added a comment - committed.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/66#issuecomment-48697394

        +1

        The fix is straightforward and the unit test looks nice.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/66#issuecomment-48697394 +1 The fix is straightforward and the unit test looks nice.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user babokim opened a pull request:

        https://github.com/apache/tajo/pull/66

        TAJO-929: Broadcast join with empty outer join table returns empty result.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/babokim/tajo TAJO-929

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/66.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #66


        commit 893f16a01460b648a9b8f3368a183694c14924c2
        Author: 김형준 <babokim@babokim-mbp.server.gruter.com>
        Date: 2014-07-10T13:04:53Z

        TAJO-929: Broadcast join with empty outer join table returns empty result.

        commit 186ae11f3ad8de0192cd367a35ff0ac8a76ccd7e
        Author: 김형준 <babokim@babokim-mbp.server.gruter.com>
        Date: 2014-07-10T13:41:11Z

        TAJO-929: Broadcast join with empty outer join table returns empty result.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user babokim opened a pull request: https://github.com/apache/tajo/pull/66 TAJO-929 : Broadcast join with empty outer join table returns empty result. You can merge this pull request into a Git repository by running: $ git pull https://github.com/babokim/tajo TAJO-929 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/66.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #66 commit 893f16a01460b648a9b8f3368a183694c14924c2 Author: 김형준 <babokim@babokim-mbp.server.gruter.com> Date: 2014-07-10T13:04:53Z TAJO-929 : Broadcast join with empty outer join table returns empty result. commit 186ae11f3ad8de0192cd367a35ff0ac8a76ccd7e Author: 김형준 <babokim@babokim-mbp.server.gruter.com> Date: 2014-07-10T13:41:11Z TAJO-929 : Broadcast join with empty outer join table returns empty result.

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hjkim Hyoungjun Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development