Skip to content

feat(bigframes): update ai.if_() params to match the SQL version#16857

Merged
sycai merged 5 commits intomainfrom
sycai_ai_if_update
Apr 30, 2026
Merged

feat(bigframes): update ai.if_() params to match the SQL version#16857
sycai merged 5 commits intomainfrom
sycai_ai_if_update

Conversation

@sycai
Copy link
Copy Markdown
Contributor

@sycai sycai commented Apr 28, 2026

Reference: https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-if

I left out the embeddings param to keep things simple. It will be introduced later.

@sycai sycai requested review from a team as code owners April 28, 2026 22:33
@sycai sycai requested review from GarrettWu and removed request for a team April 28, 2026 22:33
@sycai sycai marked this pull request as draft April 28, 2026 22:35
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds endpoint, optimization_mode, and max_error_ratio parameters to the ai.if_ function, updating the core operations, SQL compilation, and tests accordingly. The review feedback identifies a conflict between default parameter values that could lead to invalid BigQuery requests, potential null pointer exceptions during SQL generation, and an incorrect literal value used in a test case.

Comment thread packages/bigframes/bigframes/bigquery/_operations/ai.py
Comment thread packages/bigframes/tests/system/small/bigquery/test_ai.py
sycai and others added 3 commits April 28, 2026 15:48
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ai_ops.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@sycai sycai marked this pull request as ready for review April 29, 2026 18:10
@sycai sycai requested review from TrevorBergeron and tswast April 29, 2026 18:10
@sycai sycai merged commit f3cb4ad into main Apr 30, 2026
30 checks passed
@sycai sycai deleted the sycai_ai_if_update branch April 30, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants