Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1552

Add RAND function, returning DOUBLE values in the range 0..1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.11.0
    • Component/s: None
    • Labels:
      None

      Description

      Add RAND function, returning DOUBLE values in the range 0..1. It has variants RAND() and RAND(seed).

      Also, add RAND_INTEGER(seed, bound), support for a seed when generating random integers.

      To support seeds, the random function needs to have state. The random number generator is initialized, using the seed, on first use, and subsequent calls use the same random number generator. So, we are building on CALCITE-1548.

        Issue Links

          Activity

          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/6f761d36 .
          Hide
          julianhyde Julian Hyde added a comment -

          Resolved in release 1.11.0 (2017-01-11).

          Show
          julianhyde Julian Hyde added a comment - Resolved in release 1.11.0 (2017-01-11).

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development