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

Empty table makes IndexOutOfBoundsException at LEFT OUTER JOIN clause.

    Details

      Description

      If empty table use at LEFT OUTER JOIN clause, it makes IndexOutOfBoundsException as follows:

      tajo> select * from table1;
      Progress: 100%, response time: 0.146 sec
      final state: QUERY_SUCCEEDED, response time: 0.146 sec
      result: hdfs://localhost:9010/tmp/tajo-blrunner/staging/q_1387348492386_0013/RESULT, 5 rows (60 B)
      id,  name,  score,  type
      -------------------------------
      1,  ooo,  1.1,  a
      2,  ppp,  2.3,  b
      3,  qqq,  3.4,  c
      4,  rrr,  4.5,  d
      5,  xxx,  5.6,  e
      tajo> select * from table3;
      Progress: 100%, response time: 0.053 sec
      final state: QUERY_SUCCEEDED, response time: 0.053 sec
      result: hdfs://localhost:9010/tmp/tajo-blrunner/staging/q_1387348492386_0014/RESULT, 0 rows (0 B)
      id,  name,  score,  type
      -------------------------------
      tajo> select a.id, a.name, a.score, case when b.name is null then 'zzz' else b.name end as name2  from table1 a left outer join table3 b on a.id = b.id;
      Internal error!
      

      Tajo master makes log as follows:

      2013-12-18 15:39:25,678 INFO  service.AbstractService (AbstractService.java:start(94)) - Service:org.apache.tajo.worker.AbstractResourceAllocator is started.
      2013-12-18 15:39:25,678 INFO  service.AbstractService (AbstractService.java:start(94)) - Service:org.apache.tajo.master.TajoAsyncDispatcher is started.
      2013-12-18 15:39:25,679 INFO  master.TajoAsyncDispatcher (TajoAsyncDispatcher.java:start(101)) - AsyncDispatcher started:q_1387348492386_0015
      2013-12-18 15:39:25,679 INFO  service.AbstractService (AbstractService.java:start(94)) - Service:org.apache.tajo.master.querymaster.QueryMasterTask is started.
      2013-12-18 15:39:25,679 INFO  querymaster.Query (Query.java:handle(452)) - Processing q_1387348492386_0015 of type START
      2013-12-18 15:39:25,682 INFO  storage.AbstractStorageManager (AbstractStorageManager.java:listStatus(384)) - Total input paths to process : 0
      2013-12-18 15:39:25,682 INFO  storage.AbstractStorageManager (AbstractStorageManager.java:getSplits(612)) - Total # of splits: 0
      2013-12-18 15:39:25,682 ERROR querymaster.SubQuery (SubQuery.java:transition(529)) - SubQuery (eb_1387348492386_0015_000003) ERROR: 
      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
      	at java.util.ArrayList.get(ArrayList.java:322)
      	at org.apache.tajo.master.querymaster.Repartitioner.createJoinTasks(Repartitioner.java:96)
      	at org.apache.tajo.master.querymaster.SubQuery$InitAndRequestContainer.createTasks(SubQuery.java:663)
      	at org.apache.tajo.master.querymaster.SubQuery$InitAndRequestContainer.transition(SubQuery.java:517)
      	at org.apache.tajo.master.querymaster.SubQuery$InitAndRequestContainer.transition(SubQuery.java:499)
      	at org.apache.hadoop.yarn.state.StateMachineFactory$MultipleInternalArc.doTransition(StateMachineFactory.java:382)
      	at org.apache.hadoop.yarn.state.StateMachineFactory.doTransition(StateMachineFactory.java:299)
      	at org.apache.hadoop.yarn.state.StateMachineFactory.access$300(StateMachineFactory.java:43)
      	at org.apache.hadoop.yarn.state.StateMachineFactory$InternalStateMachine.doTransition(StateMachineFactory.java:445)
      	at org.apache.tajo.master.querymaster.SubQuery.handle(SubQuery.java:476)
      	at org.apache.tajo.master.querymaster.Query$StartTransition.transition(Query.java:288)
      	at org.apache.tajo.master.querymaster.Query$StartTransition.transition(Query.java:277)
      	at org.apache.hadoop.yarn.state.StateMachineFactory$SingleInternalArc.doTransition(StateMachineFactory.java:359)
      	at org.apache.hadoop.yarn.state.StateMachineFactory.doTransition(StateMachineFactory.java:299)
      	at org.apache.hadoop.yarn.state.StateMachineFactory.access$300(StateMachineFactory.java:43)
      	at org.apache.hadoop.yarn.state.StateMachineFactory$InternalStateMachine.doTransition(StateMachineFactory.java:445)
      	at org.apache.tajo.master.querymaster.Query.handle(Query.java:457)
      	at org.apache.tajo.master.querymaster.Query.handle(Query.java:54)
      	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)
      

        Attachments

        1. TAJO-427_2.patch
          16 kB
          Jaehwa Jung
        2. TAJO-427.patch
          7 kB
          Jaehwa Jung

          Issue Links

            Activity

              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: