drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Hsuan-Yi Chu (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-1943) Handle aliases and column names that differ in case only
Date Tue, 17 Mar 2015 20:28:39 GMT

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

Sean Hsuan-Yi Chu resolved DRILL-1943.
--------------------------------------
    Resolution: Fixed

Resolved in Commit#: ae2053d2a078a40033a140f2dfaeef802a5e8254

> 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)

Mime
View raw message