Skip to content

feat(bigquery): add bigquery_drop_search_index sample to drop a searc… - #14732

Merged
iennae merged 1 commit into
mainfrom
feat/bq-drop-search-index
Nov 3, 2026
Merged

iennae merged 1 commit into
mainfrom
feat/bq-drop-search-index

Conversation

@iennae

@iennae iennae commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

…h index from a table

Problem:
The BigQuery documentation (https://cloud.google.com/bigquery/docs/search-index) needs a standalone, tested Python code sample demonstrating how to drop a search index from a table (region tag bigquery_drop_search_index).

Solution:

  • Add drop_search_index(project_id: str, dataset_id: str, table_id: str) -> None in bigquery/search/bigquery_drop_search_index.py (Remove a search index from a BigQuery table using DROP SEARCH INDEX IF EXISTS.)
  • Add unit tests (bigquery/search/bigquery_drop_search_index_test.py) covering both the success path and API error handling (GoogleAPICallError)

Description

Fixes #

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

@iennae
iennae requested review from a team and chalmerlowe as code owners November 2, 2026 23:17
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Nov 2, 2026
@snippet-bot

snippet-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Nov 2, 2026

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

Copy link
Copy Markdown
Contributor

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 introduces a new Python sample and associated unit tests for dropping a BigQuery search index, along with the necessary dependency and configuration files. Feedback is provided on noxfile_config.py to correct the ignored Python versions, ensuring that the oldest supported version (3.10) is tested while intermediate versions are ignored, in line with testing guidelines.

Comment thread bigquery/search/noxfile_config.py Resolved
@iennae
iennae force-pushed the feat/bq-drop-search-index branch from 84aa177 to ea3e098 Compare November 2, 2026 23:33
…h index from a table

Problem:
The BigQuery documentation (https://cloud.google.com/bigquery/docs/search-index)
needs a standalone, tested Python code sample demonstrating how to
drop a search index from a table (region tag `bigquery_drop_search_index`).

Solution:
- Add `drop_search_index(project_id: str, dataset_id: str, table_id: str) -> None` in `bigquery/search/bigquery_drop_search_index.py`
  (Remove a search index from a BigQuery table using DROP SEARCH INDEX IF EXISTS.)
- Add unit tests (`bigquery/search/bigquery_drop_search_index_test.py`) covering both the success
  path and API error handling (`GoogleAPICallError`)
@iennae
iennae force-pushed the feat/bq-drop-search-index branch from ea3e098 to a64a627 Compare November 3, 2026 02:44

@XrossFox XrossFox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@iennae
iennae merged commit 829d3fd into main Nov 3, 2026
14 of 22 checks passed
@iennae
iennae deleted the feat/bq-drop-search-index branch November 3, 2026 20:08
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 BigQuery API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants