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 [DRAFT]
Date Mon, 17 Apr 2017 21:46:54 GMT
Zach Amsden has uploaded a new patch set (#2).

Change subject: IMPALA-5159: Optimze predicates [DRAFT]

IMPALA-5159: Optimze predicates [DRAFT]

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.  No currently known bugs.

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, 722 insertions(+), 61 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I708ce5aa2e04f8d572af6dbc9b4e49b662843f34
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Zach Amsden <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Zach Amsden <>

View raw message