drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parth Chandra (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-1943) Handle aliases and column names that differ in case only
Date Tue, 06 Jan 2015 23:56:36 GMT
Parth Chandra created DRILL-1943:

             Summary: 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: Jinfeng Ni

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

This message was sent by Atlassian JIRA

View raw message