impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Tran (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5030: Add support to NVL2() function
Date Tue, 23 May 2017 06:02:56 GMT
Vincent Tran has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/6962

Change subject: IMPALA-5030: Add support to NVL2() function
......................................................................

IMPALA-5030: Add support to NVL2() function

This change adds support to the NVL2(x,t,t) function.
It returns the second argument if the first argument is not
null, otherwise it returns the third argument. NVL2 is short
hand for the case expression “case when x is not null then y
else z end".

Change-Id: I472d973c28a00376a7c7f2bd153ddca9bb89fc70

IMPALA-5030 - Add NVL2() Function

This patch adds support for the the NVL2() function
It returns the second argument if the first argument is not
null, otherwise it returns the third argument. NVL2 is
shorthand for the case expression “case when x is not
null then y else z end.”

Change-Id: I32b03e9864f46c9c5e482280d1aa676ff7f02644
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
A fe/src/main/java/org/apache/impala/rewrite/Nvl2ToCaseRule.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
4 files changed, 103 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/62/6962/1
-- 
To view, visit http://gerrit.cloudera.org:8080/6962
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32b03e9864f46c9c5e482280d1aa676ff7f02644
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran <vttran@cloudera.com>

Mime
View raw message