You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Szehon Ho (JIRA)" <ji...@apache.org> on 2013/11/27 23:54:35 UTC

[jira] [Updated] (HIVE-5906) TestGenericUDFPower should use delta to compare doubles

     [ https://issues.apache.org/jira/browse/HIVE-5906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Szehon Ho updated HIVE-5906:
----------------------------

    Attachment: HIVE-5906.patch

Attaching a patch, with delta chosen to be the least significant digit of the expected result, which is 1e-6.

> TestGenericUDFPower should use delta to compare doubles
> -------------------------------------------------------
>
>                 Key: HIVE-5906
>                 URL: https://issues.apache.org/jira/browse/HIVE-5906
>             Project: Hive
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Szehon Ho
>            Assignee: Szehon Ho
>         Attachments: HIVE-5906.patch
>
>
> TestGenericUDFPower.testDoulePowerDecimal() uses junit's Assert.assertEquals(double, double) to test double equality on result of power udf function.
> Due to floating-number convention, this does not always work.  This API is deprecated in favor of Assert.assertEquals(message, double, double, delta).



--
This message was sent by Atlassian JIRA
(v6.1#6144)