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

Exceptions during processing nested union queries

    Details

      Description

      This error is reported from the Apache Tajo Korea user group (https://groups.google.com/forum/#!topic/tajo-user-kr/tipQj6cv-k0).

      You can reproduce the reported errors as follows:

      default> create table test_union_all (cd  int, nm text);
      default> insert into test_union_all select 1,'aaa';
      default> insert into test_union_all select 1,'bbb';
      

      Case 1
      Distributed query planner emits NPE as follows:

      default> select * from 
      (
      	 select * from test_union_all
      	 union all
      	 select * from test_union_all
      )a
      union all
      select * from 
      (
      	select * from test_union_all
      	union all
      	select * from test_union_all
      )a;
      
      2015-03-03 13:59:12,738 ERROR org.apache.tajo.querymaster.QueryMasterTask:
      java.lang.NullPointerException
              at org.apache.tajo.engine.planner.global.DataChannel.<init>(DataChannel.java:57)
              at org.apache.tajo.engine.planner.global.GlobalPlanner$DistributedPlannerVisitor.visitUnion(GlobalPlanner.java:1405)
              at org.apache.tajo.engine.planner.global.GlobalPlanner$DistributedPlannerVisitor.visitUnion(GlobalPlanner.java:1140)
              at org.apache.tajo.plan.visitor.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:96)
              at org.apache.tajo.plan.visitor.BasicLogicalPlanVisitor.visitRoot(BasicLogicalPlanVisitor.java:151)
              at org.apache.tajo.engine.planner.global.GlobalPlanner$DistributedPlannerVisitor.visitRoot(GlobalPlanner.java:1145)
              at org.apache.tajo.engine.planner.global.GlobalPlanner$DistributedPlannerVisitor.visitRoot(GlobalPlanner.java:1140)
              at org.apache.tajo.plan.visitor.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:60)
              at org.apache.tajo.engine.planner.global.GlobalPlanner.build(GlobalPlanner.java:146)
              at org.apache.tajo.querymaster.QueryMasterTask.startQuery(QueryMasterTask.java:357)
              at org.apache.tajo.querymaster.QueryMasterTask.start(QueryMasterTask.java:172)
              at org.apache.tajo.querymaster.QueryMaster$QueryStartEventHandler.handle(QueryMaster.java:410)
              at org.apache.tajo.querymaster.QueryMaster$QueryStartEventHandler.handle(QueryMaster.java:397)
              at org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:173)
              at org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:106)
              at java.lang.Thread.run(Thread.java:745)
      

      Case 2
      TaskRunner emits NPE as follows:

      default>  select * from (
      		  select cd, nm
      		  from 
      		  (
      				select cd, nm
      				from 
      				(
      				       select cd, nm
      					from test_union_all             
      				)a   
      				union all 
      				select cd, nm
      				from 
      				( 
      				     select cd, nm
      				     from test_union_all        
      				)a
      
      		) a  
       )a;
      
      2015-03-03 14:05:02,960 ERROR org.apache.tajo.worker.Task: java.lang.IllegalArgumentException: URI scheme is not "file"
      java.io.IOException: java.lang.IllegalArgumentException: URI scheme is not "file"
              at org.apache.tajo.storage.RawFile$RawFileAppender.init(RawFile.java:485)
              at org.apache.tajo.engine.planner.physical.StoreTableExec.openNewFile(StoreTableExec.java:110)
              at org.apache.tajo.engine.planner.physical.StoreTableExec.init(StoreTableExec.java:79)
              at org.apache.tajo.worker.Task.run(Task.java:405)
              at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:276)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalArgumentException: URI scheme is not "file"
              at java.io.File.<init>(File.java:421)
              at org.apache.tajo.storage.RawFile$RawFileAppender.init(RawFile.java:480)
              ... 5 more
      2015-03-03 14:05:02,963 ERROR org.apache.tajo.worker.TaskRunner:
      java.lang.NullPointerException
              at org.apache.tajo.storage.RawFile$RawFileAppender.close(RawFile.java:756)
              at org.apache.tajo.engine.planner.physical.StoreTableExec.close(StoreTableExec.java:143)
              at org.apache.tajo.worker.Task.run(Task.java:417)
              at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:276)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            • Assignee:
              ykrips Jihun Kang
              Reporter:
              jihoonson Jihoon Son
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: