Skip to content

feat: Add bigframes.bigquery.rand() function#2501

Merged
tswast merged 1 commit intomainfrom
tswast-rand
Mar 10, 2026
Merged

feat: Add bigframes.bigquery.rand() function#2501
tswast merged 1 commit intomainfrom
tswast-rand

Conversation

@tswast
Copy link
Contributor

@tswast tswast commented Mar 10, 2026

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. 🦕

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()`.

Co-authored-by: tswast <247555+tswast@users.noreply.github.com>
@tswast tswast requested review from a team as code owners March 10, 2026 16:38
@tswast tswast requested a review from GarrettWu March 10, 2026 16:38
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Mar 10, 2026
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Mar 10, 2026
@tswast
Copy link
Contributor Author

tswast commented Mar 10, 2026

e2e failure: FAILED tests/system/large/ml/test_llm.py::test_llm_gemini_pro_score_params[gemini-2.0-flash-lite-001] is unrelated.

@tswast tswast merged commit 5c43efb into main Mar 10, 2026
24 of 25 checks passed
@tswast tswast deleted the tswast-rand branch March 10, 2026 19:49
tswast added a commit that referenced this pull request Mar 16, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.8.3
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:160860d189ff1c2f7515638478823712fa5b243e27ccc33a2728669fa1e2ed0c
<details><summary>bigframes: v2.38.0</summary>

##
[v2.38.0](v2.37.0...v2.38.0)
(2026-03-16)

### Features

* Add `bigframes.bigquery.rand()` function (#2501)
([5c43efb](5c43efb7))

* add `df.bigquery` pandas accessor (#2513)
([91b6c24](91b6c245))

* Add str, dt accessors to pd.col Expression objects (#2488)
([ce5de57](ce5de570))

* add bigquery.ml.get_insights function (#2493)
([d29a609](d29a6095))

* use EUC for AI IF, CLASSIFY, and SCORE when connection is not provided
(#2507)
([fe94910](fe94910a))

### Bug Fixes

* handle unsupported types and empty results in describe (#2506)
([2326ad6](2326ad6a))

* no longer automatically use anywidget in the `%%bqsql` magics (#2504)
([43353e2](43353e2b))

### Documentation

* Fix typo in ExperimentOptions class docstring (#2498)
([077cb2e](077cb2eb))

* add notebooks to user guide page (#2505)
([5cf3788](5cf37888))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants