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

Order by query gives NullPointerException at at org.apache.tajo.catalog.Schema.getColumnId(Schema.java:142)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: Physical Operator
    • Labels:
      None

      Description

      Prepare the table like below:

      [prafulla@localhost mytests] cat data.csv
      1|abc|1.1|a
      2|def|2.3|b
      3|ghi|3.4|c
      4|jkl||d
      5|mno|5.6|e
      
      create external table table1 (id int, name text, score float, type text) using csv with ('csvfile.delimiter'='|')                                     
       location 'file:<path to data.csv>'; 
      

      Note that score table has NULL value.

      Give this query to reproduce this problem.

      tajo> select score is null from table1 order by score;
      Query failed!
      

      In logs:

      2013-12-21 13:09:04,813 INFO  worker.Task (Task.java:<init>(197)) - ==================================                                                
      2013-12-21 13:09:04,814 INFO  worker.TaskAttemptContext (TaskAttemptContext.java:setState(105)) - Query status of ta_1387659623971_0012_000001_000000\
      _02 is changed to TA_RUNNING                                                                                                                          
      2013-12-21 13:09:04,817 ERROR worker.Task (Task.java:run(366)) - java.lang.NullPointerException                                                       
              at org.apache.tajo.catalog.Schema.getColumnId(Schema.java:142)                                                                                
              at org.apache.tajo.storage.TupleComparator.<init>(TupleComparator.java:56)                                                                    
              at org.apache.tajo.engine.planner.physical.SortExec.<init>(SortExec.java:38)                                                                  
              at org.apache.tajo.engine.planner.physical.MemSortExec.<init>(MemSortExec.java:40)                                                            
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createBestSortPlan(PhysicalPlannerImpl.java:761)                                        
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createSortPlan(PhysicalPlannerImpl.java:749)                                            
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:155)                                       
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlan(PhysicalPlannerImpl.java:73)                                                 
              at org.apache.tajo.worker.TajoQueryEngine.createPlan(TajoQueryEngine.java:44)                                                                 
              at org.apache.tajo.worker.Task.run(Task.java:355)                                                                                             
              at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:376)                                                                               
              at java.lang.Thread.run(Thread.java:724)                                                                                                      
                                                                                                                                                            
      2013-12-21 13:09:04,818 INFO  worker.Task (Task.java:run(411)) - Task Counter - total:21, succeeded: 9, failed: 12                                    
      2013-12-21 13:09:04,818 ERROR querymaster.QueryUnitAttempt (QueryUnitAttempt.java:transition(292)) - FROM 127.0.1.1 >> java.lang.NullPointerException 
              at org.apache.tajo.catalog.Schema.getColumnId(Schema.java:142)                                                                                
              at org.apache.tajo.storage.TupleComparator.<init>(TupleComparator.java:56)                                                                    
              at org.apache.tajo.engine.planner.physical.SortExec.<init>(SortExec.java:38)                                                                  
              at org.apache.tajo.engine.planner.physical.MemSortExec.<init>(MemSortExec.java:40)                                                            
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createBestSortPlan(PhysicalPlannerImpl.java:761)                                        
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createSortPlan(PhysicalPlannerImpl.java:749)                                            
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:155)                                       
              at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlan(PhysicalPlannerImpl.java:73)                                                 
              at org.apache.tajo.worker.TajoQueryEngine.createPlan(TajoQueryEngine.java:44)                                                                 
              at org.apache.tajo.worker.Task.run(Task.java:355)                                                                                             
              at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:376)                                                                               
              at java.lang.Thread.run(Thread.java:724)      
      

        Activity

        Hide
        blrunner Jaehwa Jung added a comment -

        Hi, Guys~

        I commented order by clause issue at TAJO-444. This bug seems to have a same cause.

        Show
        blrunner Jaehwa Jung added a comment - Hi, Guys~ I commented order by clause issue at TAJO-444 . This bug seems to have a same cause.
        Hide
        hyunsik Hyunsik Choi added a comment -

        This is also a projection push down bug. Essentially, this bug is the same to TAJO-463.

        Show
        hyunsik Hyunsik Choi added a comment - This is also a projection push down bug. Essentially, this bug is the same to TAJO-463 .
        Hide
        hyunsik Hyunsik Choi added a comment -

        Fixed by TAJO-501.

        Show
        hyunsik Hyunsik Choi added a comment - Fixed by TAJO-501 .

          People

          • Assignee:
            hyunsik Hyunsik Choi
            Reporter:
            prafulla Prafulla T
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development