You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Parth Chandra (JIRA)" <ji...@apache.org> on 2015/01/07 00:56:36 UTC

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

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 column.










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