hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Pivovarov (JIRA)" <>
Subject [jira] [Created] (HIVE-9956) use BigDecimal.valueOf instead of new in TestFileDump
Date Fri, 13 Mar 2015 06:33:38 GMT
Alexander Pivovarov created HIVE-9956:

             Summary: use BigDecimal.valueOf instead of new in TestFileDump
                 Key: HIVE-9956
             Project: Hive
          Issue Type: Bug
            Reporter: Alexander Pivovarov
            Assignee: Alexander Pivovarov
            Priority: Minor

TestFileDump builds data row where one of the column is BigDecimal
The test adds value 2.2222
There are 2 ways to create BigDecimal object.
1. use new
2. use valueOf

in this particular case 
1. "new" will create 2.222199999999999953
2. valueOf will use the canonical String representation and the result will be 2.2222

Probably we should use valueOf to create BigDecimal object

TestTimestampWritable and TestHCatStores use valueOf

This message was sent by Atlassian JIRA

View raw message