Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 3.0
-
None
-
ghx-label-6
Description
Reported with cdh5.12.1, that "self equal to self" kind of bogus predicate "x = x" is generated by Impala and caused incorrect query result, because this kind of predicate return false for "null" entries.
It was observed that a count query returned fewer rows than a CTAS query, though the query body is the same for both, because the former generated the bogus predicate and the latter doesn't.
For example,
select count(*) from (select a.*, b.x, b.y, b.z_dt, from view1 a left join view2 b on a.p = b.q) a
returned fewer rows than
create table abc as select a.*, b.x, b.y, b.z_dt, from view1 a left join view2 b on a.p = b.q
because predicate a.z = a.z_dt was created (for reasons to understand, notice b.z_dt is an alias of b.z), exhibited as "table1.z = table1.z" in the query plan in Impala query profile because a and b are aliases of view1 and view2, both of which are views created in a very nested way that involves table table1.
Though in cdh5.12.1 the select and the count query returns different result in the initial case, an attempted reproduction shows that both queries get bogus predicates. And cdh5.15.2 has the same problem. Was not able to try out with most recent master branch of impala due to meta data incompatibility.
Attachments
Issue Links
- duplicates
-
IMPALA-8386 Incorrect predicate in a left outer join query
- Resolved
- relates to
-
IMPALA-7957 UNION ALL query returns incorrect results
- Resolved
-
IMPALA-8386 Incorrect predicate in a left outer join query
- Resolved