Commit f3cb4ad
feat(bigframes): update ai.if_() params to match the SQL version (#16857)
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.
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 8fa0f81 commit f3cb4adCopy full SHA for f3cb4ad
10 files changed
+71-10Lines changed: 71 additions & 10 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/bigframes
- bigframes
- bigquery/_operations
- core/compile
- ibis_compiler
- sqlglot/expressions
- operations
- tests
- system/small/bigquery
- unit/core/compile/sqlglot/expressions
- snapshots/test_ai_ops
- test_ai_if_with_endpoint
- test_ai_if
- None
- bigframes-dev.us.bigframes-default-connection
- third_party/bigframes_vendored/ibis/expr/operations
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/bigframes/bigframes/bigquery/_operations/ai.py
Copy file name to clipboardExpand all lines: packages/bigframes/bigframes/bigquery/_operations/ai.py+19-7Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
817 | 817 | |
818 | 818 | |
819 | 819 | |
| 820 | + |
| 821 | + |
| 822 | + |
820 | 823 | |
821 | 824 | |
822 | 825 | |
| ||
838 | 841 | |
839 | 842 | |
840 | 843 | |
841 | | - |
842 | | - |
843 | | - |
844 | | - |
845 | | - |
846 | | - |
847 | | - |
848 | 844 | |
849 | 845 | |
850 | 846 | |
851 | 847 | |
852 | 848 | |
853 | 849 | |
854 | 850 | |
| 851 | + |
| 852 | + |
| 853 | + |
| 854 | + |
| 855 | + |
| 856 | + |
| 857 | + |
| 858 | + |
| 859 | + |
| 860 | + |
| 861 | + |
| 862 | + |
| 863 | + |
855 | 864 | |
856 | 865 | |
857 | 866 | |
| ||
863 | 872 | |
864 | 873 | |
865 | 874 | |
| 875 | + |
| 876 | + |
| 877 | + |
866 | 878 | |
867 | 879 | |
868 | 880 | |
|
Collapse file
packages/bigframes/bigframes/core/compile/ibis_compiler/scalar_op_registry.py
Copy file name to clipboardExpand all lines: packages/bigframes/bigframes/core/compile/ibis_compiler/scalar_op_registry.py+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1983 | 1983 | |
1984 | 1984 | |
1985 | 1985 | |
| 1986 | + |
| 1987 | + |
| 1988 | + |
1986 | 1989 | |
1987 | 1990 | |
1988 | 1991 | |
|
Collapse file
packages/bigframes/bigframes/core/compile/sqlglot/expressions/ai_ops.py
Copy file name to clipboardExpand all lines: packages/bigframes/bigframes/core/compile/sqlglot/expressions/ai_ops.py+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
139 | 139 | |
140 | 140 | |
141 | 141 | |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
142 | 148 | |
143 | 149 | |
144 | 150 | |
|
Collapse file
packages/bigframes/bigframes/operations/ai_ops.py
Copy file name to clipboardExpand all lines: packages/bigframes/bigframes/operations/ai_ops.py+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
146 | 146 | |
147 | 147 | |
148 | 148 | |
| 149 | + |
| 150 | + |
| 151 | + |
149 | 152 | |
150 | 153 | |
151 | 154 | |
|
Collapse file
packages/bigframes/tests/system/small/bigquery/test_ai.py
Copy file name to clipboardExpand all lines: packages/bigframes/tests/system/small/bigquery/test_ai.py+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
323 | 323 | |
324 | 324 | |
325 | 325 | |
326 | | - |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
| 330 | + |
327 | 331 | |
328 | 332 | |
329 | 333 | |
|
Collapse file
packages/bigframes/tests/unit/core/compile/sqlglot/expressions/snapshots/test_ai_ops/test_ai_if/None/out.sql
Copy file name to clipboard+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
3 | 7 | |
Collapse file
packages/bigframes/tests/unit/core/compile/sqlglot/expressions/snapshots/test_ai_ops/test_ai_if/bigframes-dev.us.bigframes-default-connection/out.sql
Copy file name to clipboard+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
4 | | - |
| 4 | + |
| 5 | + |
| 6 | + |
5 | 7 | |
6 | 8 | |
Collapse file
packages/bigframes/tests/unit/core/compile/sqlglot/expressions/snapshots/test_ai_ops/test_ai_if_with_endpoint/out.sql
Copy file name to clipboard+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
Collapse file
packages/bigframes/tests/unit/core/compile/sqlglot/expressions/test_ai_ops.py
Copy file name to clipboardExpand all lines: packages/bigframes/tests/unit/core/compile/sqlglot/expressions/test_ai_ops.py+18Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
358 | 358 | |
359 | 359 | |
360 | 360 | |
| 361 | + |
| 362 | + |
| 363 | + |
| 364 | + |
| 365 | + |
| 366 | + |
| 367 | + |
| 368 | + |
| 369 | + |
| 370 | + |
| 371 | + |
| 372 | + |
| 373 | + |
| 374 | + |
| 375 | + |
| 376 | + |
| 377 | + |
| 378 | + |
361 | 379 | |
362 | 380 | |
363 | 381 | |
|
Collapse file
packages/bigframes/third_party/bigframes_vendored/ibis/expr/operations/ai_ops.py
Copy file name to clipboardExpand all lines: packages/bigframes/third_party/bigframes_vendored/ibis/expr/operations/ai_ops.py+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
138 | 138 | |
139 | 139 | |
140 | 140 | |
| 141 | + |
| 142 | + |
| 143 | + |
141 | 144 | |
142 | 145 | |
143 | 146 | |
|
0 commit comments