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

In inner join clause, empty table can cause a error by order-by clause.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.9.0
    • Fix Version/s: 0.8.0, 0.9.0
    • Component/s: distributed query plan
    • Labels:
      None

      Description

      In inner join clause, empty table can cause a error by order-by clause as follows:

      * SQL
      select a.id from table1 a, table3 b where a.id = b.id order by a.id;
      
      * Error
      4-02-27 16:01:21,118 INFO  querymaster.SubQuery (SubQuery.java:initTaskScheduler(611)) - org.apache.tajo.master.DefaultTaskScheduler is chosen for the task scheduling
      2014-02-27 16:01:21,119 INFO  querymaster.SubQuery (SubQuery.java:getNonLeafTaskNum(748)) - Table's volume is approximately 0 MB
      2014-02-27 16:01:21,119 INFO  querymaster.SubQuery (SubQuery.java:getNonLeafTaskNum(751)) - The determined number of non-leaf tasks is 1
      2014-02-27 16:01:21,121 ERROR querymaster.SubQuery (SubQuery.java:transition(595)) - SubQuery (eb_1393484173390_0002_000004) ERROR: 
      java.lang.IllegalStateException: ERROR: Invalid Column Stats (column stats: [], there exists not target a.id (INT4)
      	at com.google.common.base.Preconditions.checkState(Preconditions.java:150)
      	at org.apache.tajo.engine.utils.TupleUtil.columnStatToRange(TupleUtil.java:79)
      	at org.apache.tajo.master.querymaster.Repartitioner.scheduleRangeShuffledFetches(Repartitioner.java:332)
      	at org.apache.tajo.master.querymaster.Repartitioner.scheduleFragmentsForNonLeafTasks(Repartitioner.java:300)
      	at org.apache.tajo.master.querymaster.SubQuery$InitAndRequestContainer.schedule(SubQuery.java:733)
      	at org.apache.tajo.master.querymaster.SubQuery$InitAndRequestContainer.transition(SubQuery.java:579)
      	at org.apache.tajo.master.querymaster.SubQuery$InitAndRequestContainer.transition(SubQuery.java:560)
      	at org.apache.hadoop.yarn.state.StateMachineFactory$MultipleInternalArc.doTransition(StateMachineFactory.java:385)
      	at org.apache.hadoop.yarn.state.StateMachineFactory.doTransition(StateMachineFactory.java:302)
      	at org.apache.hadoop.yarn.state.StateMachineFactory.access$300(StateMachineFactory.java:46)
      	at org.apache.hadoop.yarn.state.StateMachineFactory$InternalStateMachine.doTransition(StateMachineFactory.java:448)
      	at org.apache.tajo.master.querymaster.SubQuery.handle(SubQuery.java:537)
      	at org.apache.tajo.master.querymaster.Query$SubQueryCompletedTransition.executeNextBlock(Query.java:560)
      	at org.apache.tajo.master.querymaster.Query$SubQueryCompletedTransition.transition(Query.java:593)
      	at org.apache.tajo.master.querymaster.Query$SubQueryCompletedTransition.transition(Query.java:546)
      	at org.apache.hadoop.yarn.state.StateMachineFactory$SingleInternalArc.doTransition(StateMachineFactory.java:362)
      	at org.apache.hadoop.yarn.state.StateMachineFactory.doTransition(StateMachineFactory.java:302)
      	at org.apache.hadoop.yarn.state.StateMachineFactory.access$300(StateMachineFactory.java:46)
      	at org.apache.hadoop.yarn.state.StateMachineFactory$InternalStateMachine.doTransition(StateMachineFactory.java:448)
      	at org.apache.tajo.master.querymaster.Query.handle(Query.java:646)
      	at org.apache.tajo.master.querymaster.Query.handle(Query.java:58)
      	at org.apache.tajo.master.TajoAsyncDispatcher.dispatch(TajoAsyncDispatcher.java:137)
      	at org.apache.tajo.master.TajoAsyncDispatcher$1.run(TajoAsyncDispatcher.java:79)
      	at java.lang.Thread.run(Thread.java:680)
      
      1. TAJO-640.patch
        5 kB
        Jaehwa Jung

        Issue Links

          Activity

          Hide
          blrunner Jaehwa Jung added a comment -

          I uploaded the patch, and I created a review request against branch master in reviewboard https://reviews.apache.org/r/18567/.

          Show
          blrunner Jaehwa Jung added a comment - I uploaded the patch, and I created a review request against branch master in reviewboard https://reviews.apache.org/r/18567/ .
          Hide
          tajoqa Tajo QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12631477/TAJO-640.patch
          against master revision 0371803.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 3 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

          +1 checkstyle. The patch generated 0 code style errors.

          -1 findbugs. The patch appears to introduce 178 new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in tajo-core/tajo-core-backend.

          Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/168//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/168//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html
          Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/168//console

          This message is automatically generated.

          Show
          tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12631477/TAJO-640.patch against master revision 0371803. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 178 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-core/tajo-core-backend. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/168//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/168//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/168//console This message is automatically generated.
          Hide
          blrunner Jaehwa Jung added a comment -

          This issue got +1 at RB.
          I committed it to the master branch and branch-0.8.0.

          Show
          blrunner Jaehwa Jung added a comment - This issue got +1 at RB. I committed it to the master branch and branch-0.8.0.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Tajo-master-build #91 (See https://builds.apache.org/job/Tajo-master-build/91/)
          TAJO-640: In inner join clause, empty table can cause a error by order-by clause. (jaehwa) (jhjung: https://git-wip-us.apache.org/repos/asf/?p=incubator-tajo.git&a=commit&h=51b019ab1591459a1e444d2ff74be01558a1e644)

          • tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testInnerJoinWithEmptyTable.sql
          • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/TpchTestBase.java
          • tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testInnerJoinWithEmptyTable.result
          • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java
          • tajo-core/tajo-core-backend/src/test/tpch/empty_orders.tbl
          • CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #91 (See https://builds.apache.org/job/Tajo-master-build/91/ ) TAJO-640 : In inner join clause, empty table can cause a error by order-by clause. (jaehwa) (jhjung: https://git-wip-us.apache.org/repos/asf/?p=incubator-tajo.git&a=commit&h=51b019ab1591459a1e444d2ff74be01558a1e644 ) tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testInnerJoinWithEmptyTable.sql tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/TpchTestBase.java tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testInnerJoinWithEmptyTable.result tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java tajo-core/tajo-core-backend/src/test/tpch/empty_orders.tbl CHANGES.txt

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development