public class RandomFunction extends Object
RAND and RAND_INTEGER, with and without
seed.| Constructor and Description |
|---|
RandomFunction()
Creates a RandomFunction.
|
| Modifier and Type | Method and Description |
|---|---|
double |
rand()
Implements the
RAND() SQL function. |
int |
randInteger(int bound)
Implements the
RAND_INTEGER(bound) SQL function. |
int |
randIntegerSeed(int seed,
int bound)
Implements the
RAND_INTEGER(seed, bound) SQL function. |
double |
randSeed(int seed)
Implements the
RAND(seed) SQL function. |
public RandomFunction()
Marked deterministic so that the code generator instantiates one once per query, not once per row.
public double rand()
RAND() SQL function.public double randSeed(int seed)
RAND(seed) SQL function.public int randInteger(int bound)
RAND_INTEGER(bound) SQL function.public int randIntegerSeed(int seed,
int bound)
RAND_INTEGER(seed, bound) SQL function.Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.