You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tajo.apache.org by "Hyunsik Choi (JIRA)" <ji...@apache.org> on 2013/12/11 10:23:08 UTC

[jira] [Updated] (TAJO-410) A query with a combination of general and distinct aggregation functions fails

     [ https://issues.apache.org/jira/browse/TAJO-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyunsik Choi updated TAJO-410:
------------------------------

    Attachment: TAJO-410.patch

This patch contains an unit test to reproduce the problematic case and the bug fix. I verified 'mvn clean install'.

> A query with a combination of general and distinct aggregation functions fails
> ------------------------------------------------------------------------------
>
>                 Key: TAJO-410
>                 URL: https://issues.apache.org/jira/browse/TAJO-410
>             Project: Tajo
>          Issue Type: Bug
>          Components: planner/optimizer
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 0.8-incubating
>
>         Attachments: TAJO-410.patch
>
>
> {code:sql}
> select 
>     l_orderkey, 
>     count(*) as cnt, 
>     count(distinct l_linenumber) as unique_key 
> from 
>     lineitem
> group by 
>     l_orderkey;
> {code}
> The above query causes the following error:
> {noformat}
> /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)) - 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)