impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Internal Jenkins (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3861: Replace BetweenPredicates with their equivalent CompoundPredicate.
Date Sat, 30 Jul 2016 07:23:52 GMT
Internal Jenkins has submitted this change and it was merged.

Change subject: IMPALA-3861: Replace BetweenPredicates with their equivalent CompoundPredicate.

IMPALA-3861: Replace BetweenPredicates with their equivalent CompoundPredicate.

The bug: Our BetweenPredicate has a complex object structure that is unlike
most other Exprs because we generate an equivalent CompoundPredicate during
analysis and replace the original children. Keeping the various members in
sync and preserving the object structure during clone() and substitute() is
very difficult and error prone. In particular, subquery rewriting is
difficult because we extract and replace correlated BinaryPredicates.
Substituting BinaryPredicates in a BetweenPredicate's children is not
equivalent to a substitution on the BetweenPredicat's original children,
so keeping the various redundant members in sync is quite difficult.

The fix is to replace BetweenPredicates with their equivalent CompoundPredicates
before performing subquery rewrites.

We ultimately still want to fix clone() and substitute() for BetweenPredicates,
but an elegant solution is likely to more involved.

Change-Id: I0838b30444ed9704ce6a058d30718a24caa7444a
Reviewed-by: Alex Behm <>
Tested-by: Internal Jenkins
M fe/src/main/java/com/cloudera/impala/analysis/
M fe/src/test/java/com/cloudera/impala/analysis/
M testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
3 files changed, 53 insertions(+), 10 deletions(-)

  Internal Jenkins: Verified
  Alex Behm: Looks good to me, approved

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I0838b30444ed9704ce6a058d30718a24caa7444a
Gerrit-PatchSet: 7
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Bharath Vissapragada <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Internal Jenkins

View raw message