Class RandomFunction

java.lang.Object
org.apache.calcite.runtime.RandomFunction

public class RandomFunction extends Object
Function object for RAND and RAND_INTEGER, with and without seed.
  • Constructor Details

    • RandomFunction

      public RandomFunction()
      Creates a RandomFunction.

      Marked deterministic so that the code generator instantiates one once per query, not once per row.

  • Method Details

    • rand

      public double rand()
      Implements the RAND() SQL function.
    • randSeed

      public double randSeed(int seed)
      Implements the RAND(seed) SQL function.
    • randInteger

      public int randInteger(int bound)
      Implements the RAND_INTEGER(bound) SQL function.
    • randIntegerSeed

      public int randIntegerSeed(int seed, int bound)
      Implements the RAND_INTEGER(seed, bound) SQL function.