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

DIV function does not return the integer portion of result as expected

    XMLWordPrintableJSON

Details

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

    Description

      Based on the spec for DIV(x,y) function, the function suppose to return the integer part of x/y. However, drill returns the exact value of x/y. For example, in drill:
      select div(120.524,7.6456) div from voter where voter_id=10;
      returns 15.763838024484672.
      The same query from postgres returns 15.

      Attachments

        Activity

          People

            DrillCommitter DrillCommitter
            knguyen Krystal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: