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

Stamatis Zampetakis updated HIVE-14705:
---------------------------------------
    Fix Version/s:     (was: 2.0.1)

I cleared the fixVersion field since this ticket is still open. Please review 
this ticket and if the fix is already committed to a specific version please 
set the version accordingly and mark the ticket as RESOLVED.

According to the [JIRA 
guidelines|https://cwiki.apache.org/confluence/display/Hive/HowToContribute] 
the fixVersion should be set only when the issue is resolved/closed.

> Hive outer queries is not picking up the right column from subqueries
> ---------------------------------------------------------------------
>
>                 Key: HIVE-14705
>                 URL: https://issues.apache.org/jira/browse/HIVE-14705
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Sahil Takiar
>            Priority: Major
>
> The following queries show the bug:
> *Setup:*
> {code}
> create table test (a int);
> insert into test values (7);
> {code}
> *Produces Wrong Results:*
> {code}
> select * from (select a-1 as a from test where a=7) z;
> +------+--+
> | z.a  |
> +------+--+
> | 7    |
> +------+--+
> {code}
> *Produces Correct Results:*
> {code}
> select * from (select a-1 as a1 from test where a=7) z;
> +-------+--+
> | z.a1  |
> +-------+--+
> | 6     |
> +-------+--+
> {code}
> Note this only happens with subqueries, as the following query returns the 
> correct value of 6 {{select a-1 as a from test where a=7}}
> This affects version 1.1.0 but has been fixed in version 2.1.0 by HIVE-13602



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to