Commit 11bd3aa
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 285394b commit 11bd3aa
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments