Commit 431149c
Add bigframes.bigquery.rand() function
This change adds `bigframes.bigquery.rand()` which wraps the BigQuery `RAND()` function.
It accepts a Series or DataFrame as input to determine the shape and index of the output Series.
It includes a warning about non-determinism in the docstring.
Additionally, `SqlScalarOp` has been updated to accept an `is_deterministic` argument, which is set to `False` for `rand()`.
Tests are added in `tests/unit/bigquery/test_mathematical.py` and `tests/system/small/bigquery/test_mathematical.py`.
Ran `nox -s format lint mypy` and confirmed no issues were introduced.
Co-authored-by: tswast <247555+tswast@users.noreply.github.com>1 parent 4f02d1d commit 431149c
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
0 commit comments