This repository was archived by the owner on May 7, 2026. It is now read-only.
Commit 4f02d1d
committed
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`.1 parent ca4aa76 commit 4f02d1d
3 files changed
Lines changed: 9 additions & 1 deletion
File tree
- bigframes
- bigquery/_operations
- operations
- tests/unit/bigquery
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
450 | 455 | | |
451 | 456 | | |
452 | 457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments