You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Navis (JIRA)" <ji...@apache.org> on 2014/11/24 06:58:12 UTC

[jira] [Commented] (HIVE-8466) nonReserved keywords can not be used as table alias

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

Navis commented on HIVE-8466:
-----------------------------

[~ashutoshc] My bad that I've missed those. I've tested on mysql and confirmed that reserved keywords are not allowed as alias. I think some(most) of keywords are safe to be used as alias but it will introduce more confusion. [~cwsteinbach], What do you think about that?

> nonReserved keywords can not be used as table alias
> ---------------------------------------------------
>
>                 Key: HIVE-8466
>                 URL: https://issues.apache.org/jira/browse/HIVE-8466
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 0.12.0, 0.13.0, 0.14.0, 0.13.1
>            Reporter: cw
>            Assignee: Navis
>            Priority: Minor
>         Attachments: HIVE-8466.1.patch, HIVE-8466.2.patch.txt, HIVE-8466.3.patch.txt
>
>
> There is a small mistake in the patch of issue HIVE-2906. See the change of FromClauseParser.g
> -    : tabname=tableName (ts=tableSample)? (KW_AS? alias=identifier)?
> -    -> ^(TOK_TABREF $tabname $ts? $alias?)
> +    : tabname=tableName (props=tableProperties)? (ts=tableSample)? (KW_AS? alias=Identifier)?
> +    -> ^(TOK_TABREF $tabname $props? $ts? $alias?)
> With the 'identifier' changed to 'Identifier' we can not use nonReserved keywords as table alias.



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