impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5529: Add additional function signatures for TRUNC()
Date Sat, 29 Jul 2017 20:53:45 GMT
Matthew Jacobs has submitted this change and it was merged.

Change subject: IMPALA-5529: Add additional function signatures for TRUNC()
......................................................................


IMPALA-5529: Add additional function signatures for TRUNC()

The following signatures to be added:
+--------------+----------------------------------+-------------+---------------+
| return type  | signature                        | binary type | is persistent |
+--------------+----------------------------------+-------------+---------------+
| DECIMAL(*,*) | trunc(DECIMAL(*,*))              | BUILTIN     | true          |
| DECIMAL(*,*) | trunc(DECIMAL(*,*), BIGINT)      | BUILTIN     | true          |
| DECIMAL(*,*) | trunc(DECIMAL(*,*), INT)         | BUILTIN     | true          |
| DECIMAL(*,*) | trunc(DECIMAL(*,*), SMALLINT)    | BUILTIN     | true          |
| DECIMAL(*,*) | trunc(DECIMAL(*,*), TINYINT)     | BUILTIN     | true          |
| BIGINT       | trunc(DOUBLE)                    | BUILTIN     | true          |
+--------------+----------------------------------+-------------+---------------+

Tests:
* Adds tests for the new builtin trunc()/dtrunc()

Change-Id: I856da9f817b948de3c72af60a0742b128398b4cf
Reviewed-on: http://gerrit.cloudera.org:8080/7450
Tested-by: Impala Public Jenkins
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
---
M common/function-registry/impala_functions.py
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java
3 files changed, 36 insertions(+), 19 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Matthew Jacobs: Looks good to me, approved



-- 
To view, visit http://gerrit.cloudera.org:8080/7450
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I856da9f817b948de3c72af60a0742b128398b4cf
Gerrit-PatchSet: 8
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Kim Jin Chul <jinchul@gmail.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Greg Rahn <grahn@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Kim Jin Chul <jinchul@gmail.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarshall@cloudera.com>

Mime
View raw message