Skip to content

fix(tools/bigquery-sql)!: ensure invoke always returns a non-null value#1020

Merged
Genesis929 merged 6 commits intogoogleapis:mainfrom
Genesis929:bq-sql-dry-run
Aug 1, 2025
Merged

fix(tools/bigquery-sql)!: ensure invoke always returns a non-null value#1020
Genesis929 merged 6 commits intogoogleapis:mainfrom
Genesis929:bq-sql-dry-run

Conversation

@Genesis929
Copy link
Contributor

@Genesis929 Genesis929 commented Jul 29, 2025

This is to make bigquery-sql consistent with bigquery-execute-sql. May not be necessary to have.

  • Added a dry run step to identify the query type (e.g., SELECT, DML), which allows the tool to correctly handle the query's output.
  • The recommended high-level client, cloud.google.com/go/bigquery, does not expose the statement type from a dry run. To circumvent this limitation, the low-level BigQuery REST API client (google.golang.org/api/bigquery/v2) was added to gain access to these necessary details.

@Genesis929 Genesis929 marked this pull request as ready for review July 29, 2025 18:02
@Genesis929 Genesis929 requested a review from a team July 29, 2025 18:02
@Genesis929 Genesis929 added the tests: run Label to trigger Github Action tests. label Jul 29, 2025
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label Jul 29, 2025
@averikitsch averikitsch requested a review from Yuan325 July 29, 2025 23:18
Copy link
Contributor

@averikitsch averikitsch left a comment

Choose a reason for hiding this comment

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

Overall, this lgtm. Tests conflicts need to be updated and we should confirm the use of dry run.

@Genesis929
Copy link
Contributor Author

Overall, this lgtm. Tests conflicts need to be updated and we should confirm the use of dry run.

Updated, fixed the use of dry_run.

@Genesis929 Genesis929 requested a review from averikitsch July 30, 2025 20:06
@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Aug 1, 2025
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label Aug 1, 2025
@Genesis929 Genesis929 merged commit 9af55b6 into googleapis:main Aug 1, 2025
10 checks passed
github-actions bot pushed a commit to Genesis929/genai-toolbox that referenced this pull request Aug 1, 2025
…ull value (googleapis#1020)

This is to make bigquery-sql consistent with bigquery-execute-sql. May
not be necessary to have.

- Added a dry run step to identify the query type (e.g., SELECT, DML),
which allows the tool to correctly handle the query's output.
- The recommended high-level client, cloud.google.com/go/bigquery, does
not expose the statement type from a dry run. To circumvent this
limitation, the low-level BigQuery REST API client
(google.golang.org/api/bigquery/v2) was added to gain access to these
necessary details.

---------

Co-authored-by: Averi Kitsch <akitsch@google.com> 9af55b6
@Yuan325 Yuan325 changed the title fix(tools/bigquery-sql): ensure invoke always returns a non-null value fix(tools/bigquery-sql)!: ensure invoke always returns a non-null value Aug 5, 2025
Yuan325 added a commit that referenced this pull request Aug 5, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.11.0](v0.10.0...v0.11.0)
(2025-08-04)


### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([#1020](#1020))
([9af55b6](9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([#1034](#1034))
([051e686](051e686))

### Features

* Add DuckDB source and tool
([#879](#879))
([fd14933](fd14933))
* Add TiDB source and tool
([#829](#829))
([6eaf36a](6eaf36a))
* Interactive web UI for Toolbox
([#1065](#1065))
([8749b03](8749b03))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([#1015](#1015))
([327ddf0](327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([#1009](#1009))
([5fa1660](5fa1660))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Aug 5, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.11.0](v0.10.0...v0.11.0)
(2025-08-04)

### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([#1020](#1020))
([9af55b6](9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([#1034](#1034))
([051e686](051e686))

### Features

* Add DuckDB source and tool
([#879](#879))
([fd14933](fd14933))
* Add TiDB source and tool
([#829](#829))
([6eaf36a](6eaf36a))
* Interactive web UI for Toolbox
([#1065](#1065))
([8749b03](8749b03))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([#1015](#1015))
([327ddf0](327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([#1009](#1009))
([5fa1660](5fa1660))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 8d0fa67
github-actions bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request Aug 5, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.11.0](googleapis/genai-toolbox@v0.10.0...v0.11.0)
(2025-08-04)

### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([googleapis#1020](googleapis#1020))
([9af55b6](googleapis@9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([googleapis#1034](googleapis#1034))
([051e686](googleapis@051e686))

### Features

* Add DuckDB source and tool
([googleapis#879](googleapis#879))
([fd14933](googleapis@fd14933))
* Add TiDB source and tool
([googleapis#829](googleapis#829))
([6eaf36a](googleapis@6eaf36a))
* Interactive web UI for Toolbox
([googleapis#1065](googleapis#1065))
([8749b03](googleapis@8749b03))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([googleapis#1015](googleapis#1015))
([327ddf0](googleapis@327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([googleapis#1009](googleapis#1009))
([5fa1660](googleapis@5fa1660))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 8d0fa67
github-actions bot pushed a commit to bpranava/genai-toolbox that referenced this pull request Aug 5, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.11.0](googleapis/genai-toolbox@v0.10.0...v0.11.0)
(2025-08-04)

### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([googleapis#1020](googleapis#1020))
([9af55b6](googleapis@9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([googleapis#1034](googleapis#1034))
([051e686](googleapis@051e686))

### Features

* Add DuckDB source and tool
([googleapis#879](googleapis#879))
([fd14933](googleapis@fd14933))
* Add TiDB source and tool
([googleapis#829](googleapis#829))
([6eaf36a](googleapis@6eaf36a))
* Interactive web UI for Toolbox
([googleapis#1065](googleapis#1065))
([8749b03](googleapis@8749b03))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([googleapis#1015](googleapis#1015))
([327ddf0](googleapis@327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([googleapis#1009](googleapis#1009))
([5fa1660](googleapis@5fa1660))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 8d0fa67
github-actions bot pushed a commit to bhardwajRahul/genai-toolbox that referenced this pull request Aug 5, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.11.0](googleapis/genai-toolbox@v0.10.0...v0.11.0)
(2025-08-04)

### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([googleapis#1020](googleapis#1020))
([9af55b6](googleapis@9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([googleapis#1034](googleapis#1034))
([051e686](googleapis@051e686))

### Features

* Add DuckDB source and tool
([googleapis#879](googleapis#879))
([fd14933](googleapis@fd14933))
* Add TiDB source and tool
([googleapis#829](googleapis#829))
([6eaf36a](googleapis@6eaf36a))
* Interactive web UI for Toolbox
([googleapis#1065](googleapis#1065))
([8749b03](googleapis@8749b03))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([googleapis#1015](googleapis#1015))
([327ddf0](googleapis@327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([googleapis#1009](googleapis#1009))
([5fa1660](googleapis@5fa1660))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> 8d0fa67
Yuan325 added a commit that referenced this pull request Aug 5, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.11.0](v0.11.0...v0.11.0)
(2025-08-05)


### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([#1020](#1020))
([9af55b6](9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([#1034](#1034))
([051e686](051e686))

### Features

* Add TiDB source and tool
([#829](#829))
([6eaf36a](6eaf36a))
* Interactive web UI for Toolbox
([#1065](#1065))
([8749b03](8749b03))
* **prebuiltconfigs/cloud-sql-postgres:** Introduce additional parameter
to limit context in list tables
([#1062](#1062))
([c3a58e1](c3a58e1))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([#1015](#1015))
([327ddf0](327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([#1009](#1009))
([5fa1660](5fa1660))

### Bug Fixes

* **tools/bigquery,mssql,mysql,postgres,spanner,tidb:** Add query
logging to execute-sql tools
([#1069](#1069))
([0527532]([0527532))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Aug 5, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.11.0](v0.11.0...v0.11.0)
(2025-08-05)

### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([#1020](#1020))
([9af55b6](9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([#1034](#1034))
([051e686](051e686))

### Features

* Add TiDB source and tool
([#829](#829))
([6eaf36a](6eaf36a))
* Interactive web UI for Toolbox
([#1065](#1065))
([8749b03](8749b03))
* **prebuiltconfigs/cloud-sql-postgres:** Introduce additional parameter
to limit context in list tables
([#1062](#1062))
([c3a58e1](c3a58e1))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([#1015](#1015))
([327ddf0](327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([#1009](#1009))
([5fa1660](5fa1660))

### Bug Fixes

* **tools/bigquery,mssql,mysql,postgres,spanner,tidb:** Add query
logging to execute-sql tools
([#1069](#1069))
([0527532]([0527532))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> a09f628
github-actions bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request Aug 5, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.11.0](googleapis/genai-toolbox@v0.11.0...v0.11.0)
(2025-08-05)

### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([googleapis#1020](googleapis#1020))
([9af55b6](googleapis@9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([googleapis#1034](googleapis#1034))
([051e686](googleapis@051e686))

### Features

* Add TiDB source and tool
([googleapis#829](googleapis#829))
([6eaf36a](googleapis@6eaf36a))
* Interactive web UI for Toolbox
([googleapis#1065](googleapis#1065))
([8749b03](googleapis@8749b03))
* **prebuiltconfigs/cloud-sql-postgres:** Introduce additional parameter
to limit context in list tables
([googleapis#1062](googleapis#1062))
([c3a58e1](googleapis@c3a58e1))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([googleapis#1015](googleapis#1015))
([327ddf0](googleapis@327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([googleapis#1009](googleapis#1009))
([5fa1660](googleapis@5fa1660))

### Bug Fixes

* **tools/bigquery,mssql,mysql,postgres,spanner,tidb:** Add query
logging to execute-sql tools
([googleapis#1069](googleapis#1069))
([0527532]([googleapis@0527532))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> a09f628
SaxenaAnushka102 pushed a commit to SaxenaAnushka102/genai-toolbox that referenced this pull request Aug 14, 2025
googleapis#1020)

This is to make bigquery-sql consistent with bigquery-execute-sql. May
not be necessary to have.

- Added a dry run step to identify the query type (e.g., SELECT, DML),
which allows the tool to correctly handle the query's output.
- The recommended high-level client, cloud.google.com/go/bigquery, does
not expose the statement type from a dry run. To circumvent this
limitation, the low-level BigQuery REST API client
(google.golang.org/api/bigquery/v2) was added to gain access to these
necessary details.

---------

Co-authored-by: Averi Kitsch <akitsch@google.com>
SaxenaAnushka102 pushed a commit to SaxenaAnushka102/genai-toolbox that referenced this pull request Aug 14, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.11.0](googleapis/genai-toolbox@v0.10.0...v0.11.0)
(2025-08-04)


### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([googleapis#1020](googleapis#1020))
([9af55b6](googleapis@9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([googleapis#1034](googleapis#1034))
([051e686](googleapis@051e686))

### Features

* Add DuckDB source and tool
([googleapis#879](googleapis#879))
([fd14933](googleapis@fd14933))
* Add TiDB source and tool
([googleapis#829](googleapis#829))
([6eaf36a](googleapis@6eaf36a))
* Interactive web UI for Toolbox
([googleapis#1065](googleapis#1065))
([8749b03](googleapis@8749b03))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([googleapis#1015](googleapis#1015))
([327ddf0](googleapis@327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([googleapis#1009](googleapis#1009))
([5fa1660](googleapis@5fa1660))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
SaxenaAnushka102 pushed a commit to SaxenaAnushka102/genai-toolbox that referenced this pull request Aug 14, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.11.0](googleapis/genai-toolbox@v0.11.0...v0.11.0)
(2025-08-05)


### ⚠ BREAKING CHANGES

* **tools/bigquery-sql:** Ensure invoke always returns a non-null value
([googleapis#1020](googleapis#1020))
([9af55b6](googleapis@9af55b6))
* **tools/bigquery-execute-sql:** Update the return messages
([googleapis#1034](googleapis#1034))
([051e686](googleapis@051e686))

### Features

* Add TiDB source and tool
([googleapis#829](googleapis#829))
([6eaf36a](googleapis@6eaf36a))
* Interactive web UI for Toolbox
([googleapis#1065](googleapis#1065))
([8749b03](googleapis@8749b03))
* **prebuiltconfigs/cloud-sql-postgres:** Introduce additional parameter
to limit context in list tables
([googleapis#1062](googleapis#1062))
([c3a58e1](googleapis@c3a58e1))
* **tools/looker-query-url:** Add support for `looker-query-url` tool
([googleapis#1015](googleapis#1015))
([327ddf0](googleapis@327ddf0))
* **tools/dataplex-lookup-entry:** Add support for
`dataplex-lookup-entry` tool
([googleapis#1009](googleapis#1009))
([5fa1660](googleapis@5fa1660))

### Bug Fixes

* **tools/bigquery,mssql,mysql,postgres,spanner,tidb:** Add query
logging to execute-sql tools
([googleapis#1069](googleapis#1069))
([0527532]([googleapis@0527532))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
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