Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 2.5.0
Description
The following query returns 10 rows.
SELECT * FROM ( SELECT a4.pos, a3.value, a1.key FROM table_1.field_18 a1 RIGHT JOIN table_3.field_90.field_92 a2 ON ((a2.key) = (a1.key)) AND ((a2.key) = (a1.key)) LEFT JOIN a2.value a3 ON ((((a3.key) = (a1.key)) AND ((a3.key) = (a2.key))) AND ((a3.key) = (a2.key))) AND ((a3.key) = (a1.key)) INNER JOIN a1.value.item a4 ON ((a4.pos) = (a3.value)) AND ((a4.pos) = (a3.value)) ) a5 WHERE a5.pos = 2 and a5.key = ""
However, the number of rows that look like (2, 2, "") is only 9 in the following query. (it should be 10). Also the query should return 98 rows instead of 96 like it currently does.
SELECT a4.pos, a3.value, a1.key FROM table_1.field_18 a1 RIGHT JOIN table_3.field_90.field_92 a2 ON ((a2.key) = (a1.key)) AND ((a2.key) = (a1.key)) LEFT JOIN a2.value a3 ON ((((a3.key) = (a1.key)) AND ((a3.key) = (a2.key))) AND ((a3.key) = (a2.key))) AND ((a3.key) = (a1.key)) INNER JOIN a1.value.item a4 ON ((a4.pos) = (a3.value)) AND ((a4.pos) = (a3.value))
To reproduce:
ssh dev@vd0206.halxg.cloudera.com -p 22222 (pw: cloudera) db name: random_nested_db_0;