impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zach Amsden (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5159: Optimze predicates
Date Sat, 15 Apr 2017 00:04:57 GMT
Zach Amsden has uploaded a new change for review.

Change subject: IMPALA-5159: Optimze predicates

IMPALA-5159: Optimze predicates

In addition to propagating constants, we can infer bounds on slotRefs
which are implied by other constant bounds.  Such conjuncts may help
us create min/max filters and/or restrict partitions.  In addition,
there is no reason not to support null-safe operators for use in joins.
In many cases, we may derive contradictions from empty ranges, and
also eliminate tests which are outside of the range.

Testing: manual testing.  This will have to be staged as a change to
the normalization rule, along with all the planner tests that get
changed, then an additional checkin to support this optimization.

For example:
 int_col1 >= int_col2 and int_col2 >= int_col1
 predicates: int_col1 = int_col2

 int_col1 >= 10 and int_col2 < int_col1 and int_col2 > 15
   and int_col1 != -100
 predicates: int_col1 > 15, int_col1 > int_col2, int_col2 > 15

 int_col1 <=> int_col2 and int_col1 >= int_col2
 predicates: int_col1 = int_col2

 int_col1 <= int_col2 and int_col2 <= int_col3 and int_col1 >= int_col3
 predicate: int_col1 = int_col2, int_col1 = int_col3

Change-Id: I708ce5aa2e04f8d572af6dbc9b4e49b662843f34
M fe/src/main/java/org/apache/impala/analysis/
M fe/src/main/java/org/apache/impala/analysis/
M fe/src/main/java/org/apache/impala/planner/
M fe/src/main/java/org/apache/impala/planner/
M fe/src/main/java/org/apache/impala/rewrite/
5 files changed, 701 insertions(+), 61 deletions(-)

  git pull ssh:// refs/changes/50/6650/1
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newchange
Gerrit-Change-Id: I708ce5aa2e04f8d572af6dbc9b4e49b662843f34
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Zach Amsden <>

View raw message