You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2015/03/16 20:39:38 UTC

[jira] [Updated] (DRILL-1943) Handle aliases and column names that differ in case only

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

Sean Hsuan-Yi Chu updated DRILL-1943:
-------------------------------------
    Assignee: Sean Hsuan-Yi Chu  (was: Jinfeng Ni)

> Handle aliases and column names that differ in case only
> --------------------------------------------------------
>
>                 Key: DRILL-1943
>                 URL: https://issues.apache.org/jira/browse/DRILL-1943
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Parth Chandra
>            Assignee: Sean Hsuan-Yi Chu
>             Fix For: 0.9.0
>
>
> 1) Consider the query 
>   select a, a from foo.
> For this query we return the columns a and a0.
> For the query 
>   select a, A from foo
> we return only one column and also leak memory. (see DRILL-1911).
> The same behaviour exists if the query uses aliases. This is not correct. 
> Aliases are explicitly specified names to remove ambiguity in column names and should be unique (ignoring case).
> A query like :
>   select A as a1, B as A1 from foo 
> should give a syntax error.
> This should be the behaviour in subqueries, view creation and CTAS queries as well.
> 2) If a subquery (or view) has column names that are different only in case, the use of the subquery or view should result in ann error if the top level query references the ambiguous column.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)