hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihir Kulkarni (JIRA)" <>
Subject [jira] [Created] (HIVE-5990) round() function with large scale chokes
Date Mon, 09 Dec 2013 23:26:06 GMT
Mihir Kulkarni created HIVE-5990:

             Summary: round() function with large scale chokes
                 Key: HIVE-5990
             Project: Hive
          Issue Type: Bug
          Components: Query Processor, UDF
    Affects Versions: 0.9.0
         Environment: CDH 4.2 running Hive 0.9
            Reporter: Mihir Kulkarni

ROUND(4.42330604244772E-305, 2000000000) chokes with following error:

FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments '2000000000': org.apache.hadoop.hive.ql.metadata.HiveException:
Unable to execute method public org.apache.hadoop.hive.ql.udf.UDFRound.evaluate(,
 on object org.apache.hadoop.hive.ql.udf.UDFRound@51809ab7 of class org.apache.hadoop.hive.ql.udf.UDFRound
with arguments {,}
of size 2

I think the problem might be in how Hive evaluates 2 arg ROUND(). The code uses
BigDecimal.valueOf(d).setScale(i, RoundingMode.HALF_UP)
which chokes by itself. I saw some changes in implementation of ROUND in hive trunk but this
is still being used in RoundUtils.

This message was sent by Atlassian JIRA

View raw message