Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.3.0
-
None
-
None
Description
create table friends ( id int not null, friend_id int, primary key (id), foreign key (friend_id) references friends (id) ); insert into friends values (210, null), (209, 210), (202, 209), (208, 202), (207, 209), (203, 207), (201, null), (204, null), (205, null), (206, 209); SELECT id, (SELECT id FROM friends as f2 WHERE f2.friend_id = f1.friend_id) AS friend FROM friends as f1 WHERE id = '202'
Select query should throw an error since subquery will result in more than one row. But hive produces following result:
202 202 202 207 202 206