tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyunsik Choi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TAJO-226) Can't use group by column alias
Date Mon, 07 Oct 2013 05:42:42 GMT

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

Hyunsik Choi updated TAJO-226:
------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

committed the patch to master. Thank you for the review.

> Can't use group by column alias
> -------------------------------
>
>                 Key: TAJO-226
>                 URL: https://issues.apache.org/jira/browse/TAJO-226
>             Project: Tajo
>          Issue Type: Bug
>          Components: planner/optimizer
>            Reporter: kim hyoung jun
>            Assignee: Hyunsik Choi
>             Fix For: 0.2-incubating
>
>         Attachments: TAJO-226_2.patch, TAJO-226.patch
>
>
> I ran the bellow query which uses column alias and group by.
> {code}
> select b.n_name as nation, count(*) as cnt
>   from customer_100 a, nation_100 b 
>  where a.c_nationkey = b.n_nationkey 
>  group by b.n_name
>  order by cnt desc
>  limit 7
> {code}
> This query  doesn't end. I found next error message in tajo worker's log.
> {code}
> 2013-10-02 21:41:21,804 INFO  planner.PhysicalPlannerImpl (PhysicalPlannerImpl.java:createBestAggregationPlan(606))
- The planner chooses [Hash Aggregation]
> 2013-10-02 21:41:21,804 INFO  planner.PhysicalPlannerImpl (PhysicalPlannerImpl.java:createInMemoryHashAggregation(558))
- The planner chooses [Hash Aggregation]
> 2013-10-02 21:41:21,808 ERROR worker.Task (Task.java:run(389)) - java.lang.ArrayIndexOutOfBoundsException:
1
>         at org.apache.tajo.engine.planner.physical.AggregationExec.<init>(AggregationExec.java:86)
>         at org.apache.tajo.engine.planner.physical.HashAggregateExec.<init>(HashAggregateExec.java:48)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createInMemoryHashAggregation(PhysicalPlannerImpl.java:559)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createBestAggregationPlan(PhysicalPlannerImpl.java:607)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createGroupByPlan(PhysicalPlannerImpl.java:553)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:148)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:152)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:169)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlan(PhysicalPlannerImpl.java:74)
>         at org.apache.tajo.worker.TajoQueryEngine.createPlan(TajoQueryEngine.java:47)
>         at org.apache.tajo.worker.Task.run(Task.java:378)
>         at org.apache.tajo.worker.TaskRunner$2.run(TaskRunner.java:364)
>         at java.lang.Thread.run(Thread.java:662)
> 2013-10-02 21:41:21,808 INFO  worker.Task (Task.java:run(434)) - Task Counter - total:11,
succeeded: 10, failed: 1
> 2013-10-02 21:41:21,808 INFO  worker.TaskRunner (TaskRunner.java:run(307)) - Request
GetTask: eb_1380717656859_0001_000004,container_1380717656859_0001_01_000040
> 2013-10-02 21:41:21,809 ERROR querymaster.QueryUnitAttempt (QueryUnitAttempt.java:transition(312))
- FROM gruter104.gruter.com >> java.lang.ArrayIndexOutOfBoundsException: 1
>         at org.apache.tajo.engine.planner.physical.AggregationExec.<init>(AggregationExec.java:86)
>         at org.apache.tajo.engine.planner.physical.HashAggregateExec.<init>(HashAggregateExec.java:48)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createInMemoryHashAggregation(PhysicalPlannerImpl.java:559)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createBestAggregationPlan(PhysicalPlannerImpl.java:607)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createGroupByPlan(PhysicalPlannerImpl.java:553)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:148)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:152)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlanRecursive(PhysicalPlannerImpl.java:169)
>         at org.apache.tajo.engine.planner.PhysicalPlannerImpl.createPlan(PhysicalPlannerImpl.java:74)
>         at org.apache.tajo.worker.TajoQueryEngine.createPlan(TajoQueryEngine.java:47)
>         at org.apache.tajo.worker.Task.run(Task.java:378)
>         at org.apache.tajo.worker.TaskRunner$2.run(TaskRunner.java:364)
>         at java.lang.Thread.run(Thread.java:662)
> 2013-10-02 21:41:21,809 INFO  event.TaskScheduleEvent (TaskSchedulerImpl.java:handle(232))
- TaskRequest: container_1380717656859_0001_01_000040,eb_1380717656859_0001_000004
> 2013-10-02 21:41:21,809 INFO  querymaster.QueryUnit (QueryUnit.java:transition(432))
- =============================================================
> 2013-10-02 21:41:21,810 INFO  querymaster.QueryUnit (QueryUnit.java:transition(433))
- >>> Task Failed: ta_1380717656859_0001_000004_000000_00 <<<
> 2013-10-02 21:41:21,810 INFO  querymaster.QueryUnit (QueryUnit.java:transition(434))
- ============================================================= 
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message