This repository was archived by the owner on May 7, 2026. It is now read-only.
Commit 5c43efb
authored
feat: Add
This change adds `bigframes.bigquery.rand()` which wraps the BigQuery
`RAND()` function. 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()`.
Fixes customer request for this function. 🦕
Co-authored-by: tswast <247555+tswast@users.noreply.github.com>bigframes.bigquery.rand() function (#2501)1 parent ce686c1 commit 5c43efbCopy full SHA for 5c43efb
5 files changed
+133Lines changed: 133 additions & 0 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- bigframes
- bigquery
- _operations
- operations
- tests
- system/small/bigquery
- unit/bigquery
Expand file treeCollapse file tree
Open diff view settings
Collapse file
bigframes/bigquery/__init__.py
Copy file name to clipboardExpand all lines: bigframes/bigquery/__init__.py+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
58 | 58 | |
59 | 59 | |
60 | 60 | |
| 61 | + |
61 | 62 | |
62 | 63 | |
63 | 64 | |
| ||
99 | 100 | |
100 | 101 | |
101 | 102 | |
| 103 | + |
| 104 | + |
102 | 105 | |
103 | 106 | |
104 | 107 | |
| ||
154 | 157 | |
155 | 158 | |
156 | 159 | |
| 160 | + |
| 161 | + |
157 | 162 | |
158 | 163 | |
159 | 164 | |
|
Collapse file
bigframes/bigquery/_operations/mathematical.py
Copy file name to clipboard+53Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
Collapse file
bigframes/operations/generic_ops.py
Copy file name to clipboardExpand all lines: bigframes/operations/generic_ops.py+5Lines changed: 5 additions & 0 deletions
| 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 | |
|
Collapse file
tests/system/small/bigquery/test_mathematical.py
Copy file name to clipboard+37Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
Collapse file
tests/unit/bigquery/test_mathematical.py
Copy file name to clipboard+33Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
0 commit comments