[ https://issues.apache.org/jira/browse/HIVE-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928838#action_12928838 ]
John Sichi commented on HIVE-1771: ---------------------------------- Example of error currently given. Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.io.LongWritable org.apache.hadoop.hive.ql.udf.UDFRound.evaluate(org.apache.hadoop.hive.serde2.io.DoubleWritable) on object org.apache.hadoop.hive.ql.udf.udfro...@7817bcd4 of class org.apache.hadoop.hive.ql.udf.UDFRound with arguments {Infinity:org.apache.hadoop.hive.serde2.io.DoubleWritable} of size 1 Note that MySQL ROUND doesn't have this problem since it makes the return type match the arg type. > ROUND(infinity) chokes > ---------------------- > > Key: HIVE-1771 > URL: https://issues.apache.org/jira/browse/HIVE-1771 > Project: Hive > Issue Type: Bug > Components: UDF > Affects Versions: 0.6.0 > Reporter: John Sichi > Assignee: John Sichi > Fix For: 0.7.0 > > > Since 1-arg ROUND returns an integer, it's hard to fix this without either > losing data (return NULL) or making a backwards-incompatible change (return > DOUBLE instead of BIGINT). > In any case, we should definitely fix 2-arg ROUND to preserve > infinity/NaN/etc, since it is already returning double. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.