Package org.apache.calcite.runtime
Class RandomFunction
- java.lang.Object
-
- org.apache.calcite.runtime.RandomFunction
-
public class RandomFunction extends java.lang.Object
Function object forRAND
andRAND_INTEGER
, with and without seed.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Random
random
-
Constructor Summary
Constructors Constructor Description RandomFunction()
Creates a RandomFunction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
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.
-
-
-
Method Detail
-
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.
-
-