Repository navigation
feat(bigquery): add bigquery_create_vector_index_tree_ah sample to cr… - #14719
Conversation
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new Python sample script and corresponding unit tests for creating a TreeAH vector index on a BigQuery table, along with test configuration and requirements files. The review feedback highlights two main improvements: removing an unreachable exceptions.AlreadyExists exception handler in the index creation script since CREATE OR REPLACE is used, and adjusting the ignored Python versions in noxfile_config.py to ensure the oldest supported version (Python 3.10) is properly tested while intermediate versions are ignored.
XrossFox
left a comment
There was a problem hiding this comment.
LGTM, there is an outdated dependency.
5fed9d8 to
80711d3
Compare
…eate a TreeAH vector index on embedding column Problem: The BigQuery documentation (https://cloud.google.com/bigquery/docs/vector-index) needs a standalone, tested Python code sample demonstrating how to create a TreeAH vector index on embedding column (region tag `bigquery_create_vector_index_tree_ah`). Solution: - Add `create_vector_index_tree_ah(project_id: str, dataset_id: str, table_id: str) -> None` in `bigquery/vector_search/bigquery_create_vector_index_tree_ah.py` (Create a ScaNN-based TREE_AH vector index on an embedding column in BigQuery using CREATE OR REPLACE VECTOR INDEX.) - Add unit tests (`bigquery/vector_search/bigquery_create_vector_index_tree_ah_test.py`) covering both the success path and API error handling (`GoogleAPICallError`)
80711d3 to
f338759
Compare
…eate a TreeAH vector index on embedding column
Problem:
The BigQuery documentation (https://cloud.google.com/bigquery/docs/vector-index) needs a standalone, tested Python code sample demonstrating how to create a TreeAH vector index on embedding column (region tag
bigquery_create_vector_index_tree_ah).Solution:
create_vector_index_tree_ah(project_id: str, dataset_id: str, table_id: str) -> Noneinbigquery/vector_search/bigquery_create_vector_index_tree_ah.py(Create a ScaNN-based TREE_AH vector index on an embedding column in BigQuery using CREATE OR REPLACE VECTOR INDEX.)bigquery/vector_search/bigquery_create_vector_index_tree_ah_test.py) covering both the success path and API error handling (GoogleAPICallError)Checklist
Testing
Compliance & Style
Post-Approval Actions