Philip Zeyliger has uploaded a new change for review. http://gerrit.cloudera.org:8080/7781
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 for recognizing that ifnull has variants. It looks like common/function-registry/impala_functions.py is used to generate ScalarBuiltins.java, 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. Testing: * Added new cases to existing unit test. Change-Id: I9e4b8bf6fedd595f9ea54ffb30fc71a058c7f16c --- M fe/src/main/java/org/apache/impala/rewrite/SimplifyConditionalsRule.java M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java 2 files changed, 34 insertions(+), 4 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/81/7781/1 -- To view, visit http://gerrit.cloudera.org:8080/7781 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e4b8bf6fedd595f9ea54ffb30fc71a058c7f16c Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Philip Zeyliger <[email protected]>
