Package org.apache.calcite.runtime
Class RandomFunction
java.lang.Object
org.apache.calcite.runtime.RandomFunction
Function object for
RAND
and RAND_INTEGER
, with and without
seed.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
rand()
Implements theRAND()
SQL function.int
randInteger
(int bound) Implements theRAND_INTEGER(bound)
SQL function.int
randIntegerSeed
(int seed, int bound) Implements theRAND_INTEGER(seed, bound)
SQL function.double
randSeed
(int seed) Implements theRAND(seed)
SQL function.
-
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 theRAND()
SQL function. -
randSeed
public double randSeed(int seed) Implements theRAND(seed)
SQL function. -
randInteger
public int randInteger(int bound) Implements theRAND_INTEGER(bound)
SQL function. -
randIntegerSeed
public int randIntegerSeed(int seed, int bound) Implements theRAND_INTEGER(seed, bound)
SQL function.
-