[ 
https://issues.apache.org/jira/browse/HIVE-10168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14392020#comment-14392020
 ] 

Alexander Pivovarov commented on HIVE-10168:
--------------------------------------------

The test is unstable because it compares double numbers without delta.
For example, if we look at JUnit API then we'll find that assertEquals requires 
delta parameter to compare double numbers
http://junit.org/apidocs/org/junit/Assert.html#assertEquals%28double,%20double,%20double%29

Because we can not use delta to compare q.out files we can use round udf 
instead to achieve similar effect as delta

> make groupby3_map.q more stable
> -------------------------------
>
>                 Key: HIVE-10168
>                 URL: https://issues.apache.org/jira/browse/HIVE-10168
>             Project: Hive
>          Issue Type: Improvement
>          Components: Tests
>            Reporter: Alexander Pivovarov
>            Assignee: Alexander Pivovarov
>         Attachments: HIVE-10168.1.patch, HIVE-10168.2.patch
>
>
> The test run aggregation query which produces several DOUBLE numbers.
> Assertion framework compares output containing DOUBLE numbers without any 
> delta.
> As a result test is not stable
> e.g. build 3219 failed with the following test result
> {code}
> groupby3_map.q.out
> 139c139
> < 130091.0    260.182 256.10355987055016      98.0    0.0     
> 142.92680950752379      143.06995106518903      20428.07287599999       
> 20469.010897795582
> ---
> > 130091.0    260.182 256.10355987055016      98.0    0.0     
> > 142.9268095075238       143.06995106518906      20428.072876    
> > 20469.01089779559
> {code}
> http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3219/testReport/junit/org.apache.hadoop.hive.cli/TestCliDriver/testCliDriver_groupby3_map/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to