Joe McDonnell has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24696 )

Change subject: IMPALA-15264: DFLOOR returns wrong datatype.
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24696/1/common/function-registry/impala_functions.py
File common/function-registry/impala_functions.py:

http://gerrit.cloudera.org:8080/#/c/24696/1/common/function-registry/impala_functions.py@482
PS1, Line 482:   [['round','dround'], 'DECIMAL', ['DECIMAL'], 
'impala::DecimalFunctions::Round'],
             :   # The reason why we declare the following function several 
times (instead of simply
             :   # setting the second argument to BIGINT and relying on 
implicit casting is because
             :   # we don't know if the first Decimal argument needs to be cast 
to double, or the second
             :   # argument needs to be cast to a BIGINT.
             :   [['round','dround'], 'DECIMAL', ['DECIMAL', 'TINYINT'], 
'impala::DecimalFunctions::RoundTo'],
             :   [['round','dround'], 'DECIMAL', ['DECIMAL', 'SMALLINT'], 
'impala::DecimalFunctions::RoundTo'],
             :   [['round','dround'], 'DECIMAL', ['DECIMAL', 'INT'], 
'impala::DecimalFunctions::RoundTo'],
             :   [['round','dround'], 'DECIMAL', ['DECIMAL', 'BIGINT'], 
'impala::DecimalFunctions::RoundTo'],
             :   [['truncate','dtrunc','trunc'], 'DECIMAL', ['DECIMAL'], 
'impala::DecimalFunctions::Truncate'],
             :   [['truncate','dtrunc','trunc'], 'DECIMAL', ['DECIMAL', 
'TINYINT'],
             :       'impala::DecimalFunctions::TruncateTo'],
             :   [['truncate','dtrunc','trunc'], 'DECIMAL', ['DECIMAL', 
'SMALLINT'],
             :       'impala::DecimalFunctions::TruncateTo'],
             :   [['truncate','dtrunc','trunc'], 'DECIMAL', ['DECIMAL', 'INT'],
             :       'impala::DecimalFunctions::TruncateTo'],
             :   [['truncate','dtrunc','trunc'], 'DECIMAL', ['DECIMAL', 
'BIGINT'],
             :       'impala::DecimalFunctions::TruncateTo'],
> Most systems don't have dfloor/dceil/dround/dtrunc.
It looks like we intended them to be aliases, and we didn't add dceil decimal 
overloads for some reason: https://issues.apache.org/jira/browse/IMPALA-1660



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I42be103dcf206c5af467fc2bd08cfdd5c62fe7c2
Gerrit-Change-Number: 24696
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Comment-Date: Wed, 19 Aug 2026 20:02:02 +0000
Gerrit-HasComments: Yes

Reply via email to