You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Venki Korukanti (JIRA)" <ji...@apache.org> on 2015/04/15 17:05:59 UTC

[jira] [Commented] (DRILL-2589) Creating a view with duplicate column names should fail or give a warning to the user

    [ https://issues.apache.org/jira/browse/DRILL-2589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14496300#comment-14496300 ] 

Venki Korukanti commented on DRILL-2589:
----------------------------------------

First we need to address why just the query {{SELECT region_id, region_id FROM cp.`region.json}} is allowed. 

> Creating a view with duplicate column names should fail or give a warning to the user
> -------------------------------------------------------------------------------------
>
>                 Key: DRILL-2589
>                 URL: https://issues.apache.org/jira/browse/DRILL-2589
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Metadata
>    Affects Versions: 0.8.0
>            Reporter: Rahul Challapalli
>            Assignee: Venki Korukanti
>             Fix For: 1.0.0
>
>
> git.commit.id.abbrev=4d398ed
> View DDL :
> {code}
> create view v1 as select pageRank, pageRank  from `/dfs/parquet/rankings`; 
> {code}
> The above view creation succeeds and drill silently renames the columns. Postgres does not allow this behavior.
> Below is the description of the view
> {code}
> describe v1;
> +-------------+------------+-------------+
> | COLUMN_NAME | DATA_TYPE  | IS_NULLABLE |
> +-------------+------------+-------------+
> | pageRank    | ANY        | NO          |
> | pageRank0   | ANY        | NO          |
> +-------------+------------+-------------+
> {code}
> In most cases the reason someone would create such a view is by mistake. So we should either not allow it or give a warning to the user in such situations



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