Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-6168

Different result range of rand/random built-in function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • Impala 2.10.0
    • None
    • Backend
    • ghx-label-2

    Description

      I am not sure this is a bug because it might be intended behavior. Please close this if it is not a bug.

      When I was re-implementing rand at IMPALA-5754, I realized some DBMSes(e.g. Postgres, MySQL and Vertica) adopt the following range: "0 <= result < 1". By the way, Impala's range of the current implementation is "0 <= result <= 1" and document also says "Returns a random value between 0 and 1".

      Would you let me know why the difference comes from? Please explain if it is intended behavior.

      Attachments

        Issue Links

          Activity

            People

              tadam Adam Tamas
              jinchul Jin Chul Kim
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: