You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "yu feng (Code Review)" <ge...@cloudera.org> on 2017/06/11 15:32:42 UTC

[Impala-ASF-CR] IMPALA-5016: Simplify COALESCE() in SimplifyConditionalsRule.

yu feng has uploaded a new patch set (#5).

Change subject: IMPALA-5016: Simplify COALESCE() in SimplifyConditionalsRule.
......................................................................

IMPALA-5016: Simplify COALESCE() in SimplifyConditionalsRule.

Simplify COALESCE by skipping leading nulls and applying the following
transformations:
COALESCE(null, a, b) -> COALESCE(a, b);
COALESCE(<literal>, a, b) -> <literal>, when literal is not NullLiteral;
COALESCE(<partition-slotref>, a, b) -> <partition-slotref>,
when the partition column does not contain NULL.

Testing:
added unit tests in ExprRewriteRulesTest

Change-Id: I0325a9e437261b15313bbdf2f22d83376a84b575
---
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, 123 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/15/7015/5
-- 
To view, visit http://gerrit.cloudera.org:8080/7015
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0325a9e437261b15313bbdf2f22d83376a84b575
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: yu feng <hz...@corp.netease.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: yu feng <hz...@corp.netease.com>