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

The trunc function has a problem with precision interception and the result has many 0

    XMLWordPrintableJSON

Details

    • Reviewed
    • Patch

    Description

      The trunc function has a problem with precision interception and the result has many 0,There is a problem with the return when the data is of decimal type, and it is displayed normally when the data is of double type。The test is as follows:

      1:Execute on beeline:

       SELECT  trunc(15.8963,3);

      ------------------------

               _c0          

      ------------------------

      15.896000000000000000  

      ------------------------
      1 row selected (0.074 seconds)

      need return “15.896”is correct。

      Attachments

        Issue Links

          Activity

            People

              simhadri-g Simhadri Govindappa
              phZhou phZhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m