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

Yibing Shi commented on HIVE-16646:
-----------------------------------

Another query that can show this problem more clearly is:
{code:sql}
select t.col from ( 
    select transform(col) using 'cat' as (COL string) from transform3_t1
) t;
{code}

It fails with below error:
{noformat}
FAILED: SemanticException [Error 10002]: Line 1:9 Invalid column reference 'col'
{noformat}

Changing {{as (COL string)}} to {{as (col string)}} makes the query run 
properly.

> Alias in transform ... as clause shouldn't be case sensitive
> ------------------------------------------------------------
>
>                 Key: HIVE-16646
>                 URL: https://issues.apache.org/jira/browse/HIVE-16646
>             Project: Hive
>          Issue Type: Bug
>          Components: hpl/sql
>            Reporter: Yibing Shi
>
> Create a table like below:
> {code:sql}
> CREATE TABLE hive_bug(col1 string);
> {code}
> Run below query in Hive:
> {code}
> from hive_bug select transform(col1) using '/bin/cat' as (AAAA string);
> {code}
> The result would be:
> {noformat}
> 0: jdbc:hive2://localhost:10000> from hive_bug select transform(col1) using 
> '/bin/cat' as (AAAA string);
> ......
> INFO  : OK
> +-------+--+
> | AAAA  |
> +-------+--+
> +-------+--+
> {noformat}
> The output column name is *AAAA* instead of the lowercase aaaa.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to