Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.1.0
-
None
-
None
-
None
Description
The following queries show the bug:
Setup:
create table test (a int);
insert into test values (7);
Produces Wrong Results:
select * from (select a-1 as a from test where a=7) z; +------+--+ | z.a | +------+--+ | 7 | +------+--+
Produces Correct Results:
select * from (select a-1 as a1 from test where a=7) z; +-------+--+ | z.a1 | +-------+--+ | 6 | +-------+--+
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
Attachments
Issue Links
- relates to
-
HIVE-15495 subquery's column alias can not be the same with partition column name
- Resolved
-
HIVE-15888 constant propagation optimizer failed when query has the same alias with subquery
- Resolved
-
HIVE-13602 TPCH q16 return wrong result when CBO is on
- Closed