mirror of
https://github.com/apache/impala.git
synced 2026-01-07 00:02:28 -05:00
The bug: Our predicate assignment logic used to rely on a flag isWhereClauseConjunct set in Exprs to determine whether assigning a predicate at a certain plan node was correct or not. This flag was intended to distinguish between predicates from the On-clause of a join and other predicates, and the bug was that we used !isWhereClauseConjunct to imply that a predicate originated from an On-clause. For example, predicates migrated into inline views apply to the post-join, post-aggregation, post-analytic result of the inline view, but the existing flag and logic were insufficient to correctly assign predicates coming from the On-clause of an enclosing block. This patch removes the isWhereClauseConjunct flag in favor of an isOnClauseConjunct flag which can more directly capture the originally intended logic. This patch also adds a test to cover the same issue reported in IMPALA-2665. Change-Id: I9ff9086b8a4e0bd2090bf88319cb917245ae73d2 Reviewed-on: http://gerrit.cloudera.org:8080/1453 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Internal Jenkins