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

A query with a combination of general and distinct aggregation functions fails

    Details

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

      Description

      select 
          l_orderkey, 
          count(*) as cnt, 
          count(distinct l_linenumber) as unique_key 
      from 
          lineitem
      group by 
          l_orderkey;
      

      The above query causes the following error:

      /tajo-localdir/q_1386667006044_0002/output
      2013-12-10 18:33:48,792 ERROR querymaster.QueryUnitAttempt (QueryUnitAttempt.java:transition(293)) - FROM  >> java.lang.Arrayy
      IndexOutOfBoundsException: 0
              at org.apache.tajo.storage.VTuple.get(VTuple.java:97)
              at org.apache.tajo.engine.function.builtin.CountRows.merge(CountRows.java:54)
              at org.apache.tajo.engine.eval.AggregationFunctionCallEval.eval(AggregationFunctionCallEval.java:65)
              at org.apache.tajo.engine.planner.physical.SortAggregateExec.next(SortAggregateExec.java:57)
              at org.apache.tajo.engine.planner.physical.StoreTableExec.next(StoreTableExec.java:84)
              at org.apache.tajo.worker.Task.run(Task.java:358)
              at org.apache.tajo.worker.TaskRunner$1.run(TaskRunner.java:376)
              at java.lang.Thread.run(Thread.java:662)
      
      2013-12-10 18:33:48,792 INFO  event.DefaultTaskSchedulerEvent (DefaultTaskScheduler.java:handle(233)) - TaskRequest: container_138666700
      06044_0002_01_000188,eb_1386667006044_0002_000002
      2013-12-10 18:33:48,792 INFO  querymaster.QueryUnit (QueryUnit.java:transition(433)) - 
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: