impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Impala Public Jenkins (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5211: Simplifying ifnull/isnull/nvl where conditional is a literal.
Date Fri, 25 Aug 2017 22:30:24 GMT
Impala Public Jenkins has submitted this change and it was merged.

Change subject: IMPALA-5211: Simplifying ifnull/isnull/nvl where conditional is a literal.

IMPALA-5211: Simplifying ifnull/isnull/nvl where conditional is a literal.

Added code to simplify ifnull(<literal>, <x>) to x if <literal> is NULL
or <literal> if it's not NULL. Removed a few unused Java imports.

I did the naive thing and hardcoded the list of ifnull aliases.
It looks like common/function-registry/ is
used to generate, and a similar approach could
be taken.

There are more conditional functions where similar approaches
can be taken; IMPALA-5211 is not yet complete with just this patch.

* Added new cases to existing unit test.
* Added a simple test case to the PlannerTest infrastructure.
* I ran the relevant test with code coverage using
  "mvn -Dtest=ExprRewriteRulesTest -Djacoco.skip=false test". Coverage
  of is very strong. There's one
  pre-existing "return expr" in simplifyCompoundPredicate that's
  not covered, and almost all the rest are preconditions checks.

Change-Id: I9e4b8bf6fedd595f9ea54ffb30fc71a058c7f16c
Reviewed-by: Alex Behm <>
Tested-by: Impala Public Jenkins
M fe/src/main/java/org/apache/impala/rewrite/
M fe/src/test/java/org/apache/impala/analysis/
2 files changed, 39 insertions(+), 5 deletions(-)

  Impala Public Jenkins: Verified
  Alex Behm: Looks good to me, approved

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e4b8bf6fedd595f9ea54ffb30fc71a058c7f16c
Gerrit-PatchSet: 8
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Philip Zeyliger <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Philip Zeyliger <>

View raw message