You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zhihua Deng (Jira)" <ji...@apache.org> on 2020/11/24 14:28:00 UTC

[jira] [Assigned] (HIVE-24422) Throw SemanticException when CTE alias is conflicted with table name

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

Zhihua Deng reassigned HIVE-24422:
----------------------------------

    Assignee: Zhihua Deng

> Throw SemanticException when CTE alias is conflicted with table name
> --------------------------------------------------------------------
>
>                 Key: HIVE-24422
>                 URL: https://issues.apache.org/jira/browse/HIVE-24422
>             Project: Hive
>          Issue Type: Improvement
>          Components: Parser
>            Reporter: Zhihua Deng
>            Assignee: Zhihua Deng
>            Priority: Major
>
> If the alias of CTE is conflicted with the table name, we use the alias fetching the table other than replacing it with the ASTNode tree, this may cause some confusing problems. For example:
> {noformat}
> create table game_info (game_name string);
> with game_info as (
> select distinct ext_id, dev_app_id, game_name
> from game_info_extend )
> select count(game_name) from game_info;{noformat}
> The query will return the number of rows of the table game_info, instead of the game_info_extend. Maybe we should better throw an exception to avoid such cases.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)