hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-8466) nonReserved keywords can not be used as table alias
Date Fri, 14 Nov 2014 17:52:34 GMT

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

Ashutosh Chauhan updated HIVE-8466:
-----------------------------------
             Assignee: Navis
    Affects Version/s: 0.14.0
               Status: Open  (was: Patch Available)

Changes in *dynamic_part_pruning tests are interesting. 
{code}
EXPLAIN select count(*) from srcpart left join srcpart_date on (srcpart.ds = srcpart_date.ds)
{code}

After this change left is now considered as alias for srcpart, whereas user intended it to
indicate left outer join. Queries as modified in patch results in inner join with left as
alias for table. This is not the intention of that use case, which is wanting to test left
outer joins. Can you test instead following queries work 
{code}
EXPLAIN select count(*) from srcpart left outer join srcpart_date on (srcpart.ds = srcpart_date.ds)
{code}
If this does work, than we need to document that outer keyword is no longer optional while
trying to do left or right outer joins. If this doesnt work or if we want to support original
query that means user necessarily need to have alias while using left or outer joins. Is that
what we want? It will be good to see what other dbs (like mysql / postgres etc) do in these
cases.

> 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.13.1, 0.13.0, 0.12.0, 0.14.0
>            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)

Mime
View raw message