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

During filter push down phase, join conditions are not set properly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: Planner/Optimizer
    • Labels:
      None

      Description

      See the title.
      You can reproduce with this query.

      default> select
        n1.n_name as supp_nation, n2.n_name as cust_nation, n1.n_nationkey as s_nationkey, n2.n_nationkey as c_nationkey
      from
        nation n1 join nation n2
        on
          n1.n_name = 'FRANCE' and n2.n_name = 'GERMANY'
      UNION ALL
      select
        n1.n_name as supp_nation, n2.n_name as cust_nation, n1.n_nationkey as s_nationkey, n2.n_nationkey as c_nationkey
      from
        nation n1 join nation n2
        on
          n2.n_name = 'FRANCE' and n1.n_name = 'GERMANY'
      

      This query causes an NPE as follow:

      2015-07-31 11:06:38,255 ERROR org.apache.tajo.worker.TaskImpl:
      java.lang.NullPointerException
              at org.apache.tajo.plan.util.PlannerUtil.getJoinKeyPairs(PlannerUtil.java:675)
              at org.apache.tajo.engine.planner.physical.CommonHashJoinExec.<init>(CommonHashJoinExec.java:64)
              at org.apache.tajo.engine.planner.physical.HashJoinExec.<init>(HashJoinExec.java:32)
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createBestInnerJoinPlan(PhysicalPlannerImpl.java:439)
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createInnerJoinPlan(PhysicalPlannerImpl.java:385)
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createJoinPlan(PhysicalPlannerImpl.java:300)
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:220)
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlan(PhysicalPlannerImpl.java:92)
              at org.apache.tajo.worker.TajoQueryEngine.createPlan(TajoQueryEngine.java:40)
              at org.apache.tajo.worker.TaskImpl.run(TaskImpl.java:396)
              at org.apache.tajo.worker.TaskContainer.run(TaskContainer.java:65)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user jihoonson opened a pull request:

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

        TAJO-1732: During filter push down phase, join conditions are not set properly

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

        $ git pull https://github.com/jihoonson/tajo-2 TAJO-1732

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

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


        commit 7a3a24936dcfcf47e2b64befaecb6a8b1b1720a3
        Author: Jihoon Son <jihoonson@apache.org>
        Date: 2015-07-31T02:56:15Z

        TAJO-1732


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user jihoonson opened a pull request: https://github.com/apache/tajo/pull/670 TAJO-1732 : During filter push down phase, join conditions are not set properly You can merge this pull request into a Git repository by running: $ git pull https://github.com/jihoonson/tajo-2 TAJO-1732 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/670.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 #670 commit 7a3a24936dcfcf47e2b64befaecb6a8b1b1720a3 Author: Jihoon Son <jihoonson@apache.org> Date: 2015-07-31T02:56:15Z TAJO-1732
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/670#issuecomment-129700228

        +1 LGTM

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

        Github user asfgit closed the pull request at:

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

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/670
        Hide
        jihoonson Jihoon Son added a comment -

        Committed to master.

        Show
        jihoonson Jihoon Son added a comment - Committed to master.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jihoonson commented on the pull request:

        https://github.com/apache/tajo/pull/670#issuecomment-129704053

        Thanks for your review.

        Show
        githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on the pull request: https://github.com/apache/tajo/pull/670#issuecomment-129704053 Thanks for your review.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-build #795 (See https://builds.apache.org/job/Tajo-master-build/795/)
        TAJO-1732: During filter push down phase, join conditions are not set properly. (jihoonson: rev caf8cca94699a687f28e7fcf2c8f6efb67773983)

        • tajo-core/src/test/resources/queries/TestTPCH/testFirstJoinInQ7.sql
        • tajo-core/src/test/java/org/apache/tajo/benchmark/TestTPCH.java
        • tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/FilterPushDownRule.java
        • CHANGES
        • tajo-plan/src/main/java/org/apache/tajo/plan/logical/JoinNode.java
        • tajo-core/src/test/resources/results/TestTPCH/testFirstJoinInQ7.plan
        • tajo-core/src/test/resources/results/TestTPCH/testFirstJoinInQ7.result
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-build #795 (See https://builds.apache.org/job/Tajo-master-build/795/ ) TAJO-1732 : During filter push down phase, join conditions are not set properly. (jihoonson: rev caf8cca94699a687f28e7fcf2c8f6efb67773983) tajo-core/src/test/resources/queries/TestTPCH/testFirstJoinInQ7.sql tajo-core/src/test/java/org/apache/tajo/benchmark/TestTPCH.java tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/FilterPushDownRule.java CHANGES tajo-plan/src/main/java/org/apache/tajo/plan/logical/JoinNode.java tajo-core/src/test/resources/results/TestTPCH/testFirstJoinInQ7.plan tajo-core/src/test/resources/results/TestTPCH/testFirstJoinInQ7.result
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #433 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/433/)
        TAJO-1732: During filter push down phase, join conditions are not set properly. (jihoonson: rev caf8cca94699a687f28e7fcf2c8f6efb67773983)

        • tajo-core/src/test/resources/queries/TestTPCH/testFirstJoinInQ7.sql
        • tajo-core/src/test/java/org/apache/tajo/benchmark/TestTPCH.java
        • tajo-core/src/test/resources/results/TestTPCH/testFirstJoinInQ7.result
        • tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/FilterPushDownRule.java
        • tajo-core/src/test/resources/results/TestTPCH/testFirstJoinInQ7.plan
        • CHANGES
        • tajo-plan/src/main/java/org/apache/tajo/plan/logical/JoinNode.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #433 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/433/ ) TAJO-1732 : During filter push down phase, join conditions are not set properly. (jihoonson: rev caf8cca94699a687f28e7fcf2c8f6efb67773983) tajo-core/src/test/resources/queries/TestTPCH/testFirstJoinInQ7.sql tajo-core/src/test/java/org/apache/tajo/benchmark/TestTPCH.java tajo-core/src/test/resources/results/TestTPCH/testFirstJoinInQ7.result tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/FilterPushDownRule.java tajo-core/src/test/resources/results/TestTPCH/testFirstJoinInQ7.plan CHANGES tajo-plan/src/main/java/org/apache/tajo/plan/logical/JoinNode.java

          People

          • Assignee:
            jihoonson Jihoon Son
            Reporter:
            jihoonson Jihoon Son
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development