Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1121

decimal division rounding error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • Functions - Drill
    • None

    Description

      #Wed Jul 09 10:28:32 PDT 2014
      git.commit.id.abbrev=810a204

      In the following decimal division, the rounding of number large than 5 should be rounded up.

      postgres:
      foodmart=# select cast('123456789' as decimal(9,0)) / cast('12345678901234.56789123456789' as decimal(28,14)) from data limit 1;
      ?column?
      ----------------------------
      0.000009999999998999999999

      drill:
      0: jdbc:drill:schema=dfs> select cast('123456789' as decimal(9,0)) / cast('12345678901234.56789123456789' as decimal(28,14)) from data limit 1;
      ------------

      EXPR$0

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

      0.000009999999998

      The last digit should be 9.

      Attachments

        1. DRILL-1121.patch
          3 kB
          Mehant Baid

        Activity

          People

            DrillCommitter DrillCommitter
            cchang@maprtech.com Chun Chang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: