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

Self-Join query (including partitioned table) doesn't run unexpectedly using auto broadcast join.

    Details

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

      Description

      I found that self-join (including partitioned table) didn't run against my expectation using auto broad cast join.
      For example, I created three tables as follows:

      create table table1 (id int, name text, score float, type text) 
      using csv with ('csvfile.delimiter'='|') ;
      
      create table table2 (id int, name text, score float) 
      using csv with ('csvfile.delimiter'='|') partition by column(type text);
      
      create table table3 (id int, name text, score float) 
      using csv with ('csvfile.delimiter'='|') partition by column(type text);
      

      There is same data in all table as follows:

      Unable to find source-code formatter for language: xm. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      1|name1-1|1.1|a
      2|name1-2|2.3|b
      3|name1-3|3.4|c
      4|name1-4|4.5|d
      5|name1-5|5.6|e
      

      Following queries have to print same result as follows:

      select a.* from table1 a join table1 b on a.type = b.type where a.type in ('a');
      
       select a.* from table2 a join table3 b on a.type = b.type where a.type in ('a');
      
      select a.* from table2 a join table2 b on a.type = b.type where a.type in ('a');
      

      But above queries print result data differently.
      First and second query print result as follows:

      id,  name,  score,  type
      -------------------------------
      1,  name1-1,  1.1,  a
      

      But last query print result as follows:

      id,  name,  score,  type
      -------------------------------
      1,  name1-1,  1.1,  a
      1,  name1-1,  1.1,  a
      

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user blrunner opened a pull request:

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

        TAJO-968: Self-Join query (including partitioned table) doesn't run unex...

        ...pectedly using auto broad cast join. (jaehwa)

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

        $ git pull https://github.com/blrunner/tajo TAJO-968

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

        https://github.com/apache/tajo/pull/88.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 #88


        commit 0526cecefc60523f7bf3858b60d22770ffe777b8
        Author: blrunner <jhjung@gruter.com>
        Date: 2014-07-22T14:08:39Z

        TAJO-968: Self-Join query (including partitioned table) doesn't run unexpectedly using auto broad cast join. (jaehwa)


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user blrunner opened a pull request: https://github.com/apache/tajo/pull/88 TAJO-968 : Self-Join query (including partitioned table) doesn't run unex... ...pectedly using auto broad cast join. (jaehwa) You can merge this pull request into a Git repository by running: $ git pull https://github.com/blrunner/tajo TAJO-968 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/88.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 #88 commit 0526cecefc60523f7bf3858b60d22770ffe777b8 Author: blrunner <jhjung@gruter.com> Date: 2014-07-22T14:08:39Z TAJO-968 : Self-Join query (including partitioned table) doesn't run unexpectedly using auto broad cast join. (jaehwa)
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/88#issuecomment-49959810

        +1

        LGTM!

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/88#issuecomment-49959810 +1 LGTM!
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/88#issuecomment-49961765

        Thanks Hyunsik.
        I've just committed it to master branch.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/88#issuecomment-49961765 Thanks Hyunsik. I've just committed it to master branch.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

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

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/88
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #313 (See https://builds.apache.org/job/Tajo-master-build/313/)
        TAJO-968: Self-Join query (including partitioned table) doesn't run unexpectedly using auto broad cast join. (jaehwa) (blrunner: rev 72808e06f02cbb0bd7d9cf345544c60205cf34b0)

        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinBroadcast.java
        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/worker/TaskAttemptContext.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #313 (See https://builds.apache.org/job/Tajo-master-build/313/ ) TAJO-968 : Self-Join query (including partitioned table) doesn't run unexpectedly using auto broad cast join. (jaehwa) (blrunner: rev 72808e06f02cbb0bd7d9cf345544c60205cf34b0) tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinBroadcast.java CHANGES tajo-core/src/main/java/org/apache/tajo/worker/TaskAttemptContext.java

          People

          • Assignee:
            blrunner Jaehwa Jung
            Reporter:
            blrunner Jaehwa Jung
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development