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/03 10:46:37 UTC

[jira] [Work started] (TAJO-363) Columns in subquery schema cannot be resolved

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

Work on TAJO-363 started by Hyunsik Choi.

> Columns in subquery schema cannot be resolved
> ---------------------------------------------
>
>                 Key: TAJO-363
>                 URL: https://issues.apache.org/jira/browse/TAJO-363
>             Project: Tajo
>          Issue Type: Bug
>          Components: parser, planner/optimizer
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>            Priority: Critical
>             Fix For: 0.8-incubating
>
>
> See the below SQL statement. This statement contains a subquery with schema binding. Currently, LogicalPlanner cannot recognize subquery schema. So,  the below statement causes "no such a column name  exception".
> {code}
> select 
>   c_count, 
>   count(*) as custdist 
> from 
> ( 
>   select 
>     c_custkey, 
>     count(o_orderkey) 
>   from 
>     customer left outer join 
>     orders 
>       on c_custkey = o_custkey and 
>       o_comment not like '%special%requests%' 
>   group by 
>     c_custkey 
> ) as c_orders (c_custkey, c_count) 
> group by 
> 	c_count 
> order by 
> 	custdist desc, c_count desc;
> ERROR: no such a column name c_count
> {code}



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