Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9956

use BigDecimal.valueOf instead of new in TestFileDump

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.2.0
    • File Formats
    • None

    Description

      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

      Attachments

        1. HIVE-9956.1.patch
          4 kB
          Alexander Pivovarov
        2. HIVE-9956.1.patch
          4 kB
          Alexander Pivovarov

        Issue Links

          Activity

            People

              apivovarov Alexander Pivovarov
              apivovarov Alexander Pivovarov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: