GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(bigquery): support queryResultsFormat and compressionCodec in query_and_wait by alextolpin · Pull Request #18027 · googleapis/google-cloud-python

Conversation

@alextolpin

@alextolpin alextolpin commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Adds support for fetching query results in Apache Arrow format directly via query_and_wait() using queryResultsFormat="ARROW" and optional buffer compression (e.g., compression_codec="LZ4_FRAME").

  1. query_and_wait & _job_helpers Enhancements:

    • Added query_results_format and compression_codec parameters (with [Beta] docstring annotations) to client.query_and_wait(), client._query_and_wait_bigframes(), and _job_helpers.query_and_wait().
    • Included queryResultsFormat in _job_helpers.keys_allowlist and populated formatOptions.arrowSerializationOptions.bufferCompression in jobs.query REST API request payloads.
    • Refactored _wait_or_cancel() to accept and preserve query_results_format on returned RowIterator instances.
  2. Arrow Serialization & Direct Job Stream Reading:

    • Added RowIterator._download_arrow_from_job_id() to stream Arrow record batches directly from projects/{project}/locations/{location}/jobs/{job_id}/streams/_default via the BigQuery Storage Read API.
    • Added logic to decode base64 inline arrowSchema and arrowRecordBatch from the initial jobs.query REST response (_first_page_response), calculate the starting row offset, and resume read_rows(stream_name, offset=offset).
    • Added an optimization to skip calling read_rows() or initializing BigQueryReadClient if jobComplete = True and all rows were returned within the first page response.
  3. Safety & Enforcement:

    • Overrode pages, __iter__, and __next__ on RowIterator and _EmptyRowIterator to raise a descriptive ValueError if non-Arrow iteration is attempted when queryResultsFormat="ARROW".
  4. Testing:

    • Added comprehensive unit test suite in tests/unit/test_query_results_format_arrow.py (16 passing tests) covering request body formatting, parameter propagation, base64 payload decoding, offset calculation, stream URI construction, and Storage client skipping when all rows are present in the first page.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@alextolpin
alextolpin requested review from a team as code owners August 7, 2026 14:40
@alextolpin
alextolpin requested review from sycai and removed request for a team August 7, 2026 14:40
gemini-code-assist[bot]
gemini-code-assist Bot reviewed Aug 7, 2026
View reviewed changes

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

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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 introduces support for the Arrow query results format and compression codecs in query_and_wait. It adds the query_results_format and compression_codec parameters, prevents standard iteration on RowIterator when the format is Arrow, and implements _download_arrow_from_job_id to retrieve Arrow results via the BigQuery Storage Read API. The review feedback highlights several important improvements: adding formatOptions to the _supported_by_jobs_query allowlist to prevent unnecessary fallbacks to jobs.insert, raising an error instead of silently skipping record batches when the schema is missing, safely retrieving totalRows to avoid potential KeyErrors, and validating key identifiers before constructing the stream name to prevent cryptic API errors.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/_job_helpers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Outdated
Comment on lines +2341 to +2345
project = self._project or (self.client.project if self.client else None)
location = self._location or (self.client.location if self.client else None)
stream_name = (
f"projects/{project}/locations/{location}/jobs/{self._job_id}/streams/_default"
)

@gemini-code-assist gemini-code-assist Bot Aug 7, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

medium

If project, location, or self._job_id is None, the constructed stream_name will contain literal "None" values (e.g., projects/None/locations/None/...), leading to cryptic API errors. Adding explicit validation checks ensures a clear, local error is raised instead.

        project = self._project or (self.client.project if self.client else None)
        location = self._location or (self.client.location if self.client else None)
        if not project:
            raise ValueError("Project is required to read Arrow results.")
        if not location:
            raise ValueError("Location is required to read Arrow results.")
        if not self._job_id:
            raise ValueError("Job ID is required to read Arrow results.")
        stream_name = (
            f"projects/{project}/locations/{location}/jobs/{self._job_id}/streams/_default"
        )
References
  1. When a function receives parameters of an unsupported type, it should raise an error instead of silently returning empty values to ensure fail-fast behavior.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@parthea

parthea commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Hi @alextolpin, Thanks for opening a PR! I'm going to switch this PR to draft since presubmits are failing but please feel free to mark it ready for review once tests are green. Please make sure to file an issue here as per the checklist

Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-cloud-python/issues) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@parthea
parthea marked this pull request as draft August 10, 2026 16:01
@parthea parthea assigned alextolpin Aug 10, 2026
@alextolpin
alextolpin force-pushed the arrow_iterable branch from 269ed8e to c5bdd3b Compare August 10, 2026 19:40
@alextolpin
alextolpin marked this pull request as ready for review August 10, 2026 19:41
@alextolpin alextolpin mentioned this pull request Aug 10, 2026
feat(bigquery): Support queryResultsFormat and compressionCodec in query_and_wait() #18047
Open
1 task done
@alextolpin

alextolpin commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @alextolpin, Thanks for opening a PR! I'm going to switch this PR to draft since presubmits are failing but please feel free to mark it ready for review once tests are green. Please make sure to file an issue here as per the checklist

Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-cloud-python/issues) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea

Created #18047

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daniel-sanche
daniel-sanche reviewed Aug 10, 2026
View reviewed changes

@daniel-sanche daniel-sanche left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Added some comments, and it looks like Gemini caught some potential data loss issues too

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/_job_helpers.py Outdated
query_results_format (Optional[str]):
[Beta] The format for query results (e.g. "ARROW").
compression_codec (Optional[str]):
[Beta] Compression codec for Arrow serialization (e.g. "LZ4_FRAME").

@daniel-sanche daniel-sanche Aug 10, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

What does [Beta] represent here? Does this mean the backend API isn't stable?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@alextolpin alextolpin Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It means that this feature will be in public preview. Generally public previews have the following note in public documentation:

"This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions."

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/client.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/tests/unit/test_query_results_format_arrow.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/table.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2026
@alextolpin
alextolpin force-pushed the arrow_iterable branch from 71f9a63 to ff0a978 Compare August 12, 2026 16:20
@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2026
@alextolpin
alextolpin force-pushed the arrow_iterable branch from 3457c95 to 86e972e Compare August 12, 2026 18:21
sycai
sycai reviewed Aug 12, 2026
View reviewed changes

@sycai sycai left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Could you also address the comments left by the AI code reviewer? Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/_job_helpers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/google-cloud-bigquery/google/cloud/bigquery/client.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2026
@alextolpin

alextolpin commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Could you also address the comments left by the AI code reviewer? Thanks!

done!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alextolpin added 7 commits August 12, 2026 19:53
@alextolpin
first iteration
fae9a02
@alextolpin
compression
cf28441
@alextolpin
comments
b31478c
@alextolpin
check total rows
42a75a8
@alextolpin
cr
024a17c
@alextolpin
fix(bigquery): update test_wait_or_cancel_no_exception mock for _quer…
ecad8f5
…y_results_format
@alextolpin
fix lint
0e8e40a
alextolpin added 7 commits August 12, 2026 19:53
@alextolpin
address comments
9e331ee
@alextolpin
to_dataframe
bb61218
@alextolpin
fix lint
75bc530
@alextolpin
fix test names
effa474
@alextolpin
fix tests
40d3c30
@alextolpin
fix tests
4f621e8
@alextolpin
address feedback
3ddfd28
@alextolpin
alextolpin force-pushed the arrow_iterable branch from 86e972e to 3ddfd28 Compare August 12, 2026 19:53
@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2026
tswast
tswast approved these changes Aug 13, 2026
View reviewed changes
Comment thread packages/google-cloud-bigquery/tests/unit/test_query_results_format_arrow.py
from google.cloud.bigquery.table import RowIterator, _EmptyRowIterator


class TestQueryResultsFormatOption1(unittest.TestCase):

@tswast tswast Aug 13, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nit: We prefer the classless pytest-style tests, but acknowledged that the client has a mix of both, so not really worth blocking this PR for that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sycai
sycai approved these changes Aug 13, 2026
View reviewed changes
@sycai sycai added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 13, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 13, 2026
@chalmerlowe
chalmerlowe merged commit d172408 into googleapis:main Aug 13, 2026
46 of 49 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@alextolpin
alextolpin deleted the arrow_iterable branch August 13, 2026 17:06
@release-please release-please Bot mentioned this pull request Aug 13, 2026
chore: release main #18013
Merged
@alextolpin alextolpin mentioned this pull request Aug 16, 2026
samples(bigquery-storage): add Arrow query results samples for query_and_wait and read_rows #18126
Merged
3 tasks done
codyoss pushed a commit that referenced this pull request Aug 24, 2026
@release-please
chore: release main (#18013)
3e29682
🤖 I have created a release *beep* *boop*
---


<details><summary>django-google-spanner: 5.0.1</summary>

##
[5.0.1](django-google-spanner-v5.0.0...django-google-spanner-v5.0.1)
(2026-08-21)


### Bug Fixes

* **django-spanner:** declare django dependency in setup.py
([#18044](#18044))
([c341469](c341469))


### Documentation

* **django-spanner, common-protos:** centralize CONTRIBUTING.rst
pointers
([#18041](#18041))
([2b056ab](2b056ab))
</details>

<details><summary>gapic-generator: 1.39.0</summary>

##
[1.39.0](gapic-generator-v1.38.0...gapic-generator-v1.39.0)
(2026-08-21)


### Features

* **generator:** add fallback compatibility imports for google-api-core
helpers
([#17999](#17999))
([9c13ae2](9c13ae2))


### Bug Fixes

* **generator:** check for api_version header in metadata list
([#18015](#18015))
([0e63510](0e63510))
* **generator:** move version checks after __all__ in __init__.py
temlate
([#18100](#18100))
([d0efb4d](d0efb4d))
* **generator:** switch core_deps_from_source to DEFAULT_PYTHON_VERSION
([#18050](#18050))
([895ffa2](895ffa2))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>gcp-sphinx-docfx-yaml: 3.3.2</summary>

##
[3.3.2](gcp-sphinx-docfx-yaml-v3.3.1...gcp-sphinx-docfx-yaml-v3.3.2)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-ads-admanager: 0.10.2</summary>

##
[0.10.2](google-ads-admanager-v0.10.1...google-ads-admanager-v0.10.2)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-ads-datamanager: 0.9.2</summary>

##
[0.9.2](google-ads-datamanager-v0.9.1...google-ads-datamanager-v0.9.2)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-api-core: 2.35.0</summary>

##
[2.35.0](google-api-core-v2.34.0...google-api-core-v2.35.0)
(2026-08-21)


### Features

* **api_core:** add deprecation warning for grpcio &lt; 1.83.0 for PQC
([#18045](#18045))
([7e2e23e](7e2e23e))


### Bug Fixes

* **api_core:** improve rest path validation
([#17753](#17753))
([63bfb96](63bfb96))
* **api_core:** support suppress_metrics_header fallback in
AuthMetadataPlugin
([#18029](#18029))
([dd2000d](dd2000d))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-apps-chat: 0.10.5</summary>

##
[0.10.5](google-apps-chat-v0.10.4...google-apps-chat-v0.10.5)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))
</details>

<details><summary>google-auth: 2.57.0</summary>

##
[2.57.0](google-auth-v2.56.3...google-auth-v2.57.0)
(2026-08-21)


### Features

* **auth:** add deprecation warning for grpcio &lt; 1.83.0 (PQC support)
([#18070](#18070))
([68bdaba](68bdaba))


### Bug Fixes

* **auth:** parse hostname for mTLS and PSC endpoint certificate rotat…
([#18153](#18153))
([b642373](b642373))
* **auth:** prevent TypeError and support home-dir cert fallback for X…
([#18016](#18016))
([b9a1379](b9a1379))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-auth-httplib2: 0.4.2</summary>

##
[0.4.2](google-auth-httplib2-v0.4.1...google-auth-httplib2-v0.4.2)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-auth-oauthlib: 1.4.1</summary>

##
[1.4.1](google-auth-oauthlib-v1.4.0...google-auth-oauthlib-v1.4.1)
(2026-08-21)


### Bug Fixes

* **google-auth-oauthlib:** prevent port re-use on windows
([#18166](#18166))
([e20796a](e20796a))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-alloydb: 0.11.1</summary>

##
[0.11.1](google-cloud-alloydb-v0.11.0...google-cloud-alloydb-v0.11.1)
(2026-08-21)


### Features

* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))
</details>

<details><summary>google-cloud-audit-log: 0.6.2</summary>

##
[0.6.2](google-cloud-audit-log-v0.6.1...google-cloud-audit-log-v0.6.2)
(2026-08-21)


### Bug Fixes

* `google-cloud-audit-log` wheel installs unintended top-level `docs`
package
([#17271](#17271))
([ad99ed1](ad99ed1))
</details>

<details><summary>google-cloud-auditmanager: 0.3.1</summary>

##
[0.3.1](google-cloud-auditmanager-v0.3.0...google-cloud-auditmanager-v0.3.1)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))
</details>

<details><summary>google-cloud-automl: 2.20.1</summary>

##
[2.20.1](google-cloud-automl-v2.20.0...google-cloud-automl-v2.20.1)
(2026-08-21)


### Bug Fixes

* **automl:** remove unused libcst extra and constraints
([#18056](#18056))
([9ba4449](9ba4449))
</details>

<details><summary>google-cloud-bigquery: 3.44.0</summary>

##
[3.44.0](google-cloud-bigquery-v3.43.0...google-cloud-bigquery-v3.44.0)
(2026-08-21)


### Features

* add PendingDeprecationWarning for to_dataframe and to_arrow conversion
methods
([#18021](#18021))
([6bebf30](6bebf30))
* **bigquery:** add PendingDeprecationWarning for from_dataframe methods
([#18048](#18048))
([b84b754](b84b754))
* **bigquery:** support queryResultsFormat and compressionCodec in
query_and_wait
([#18027](#18027))
([d172408](d172408))
* check python and dependency versions in bigquery and ndb
([#18075](#18075))
([62ff6f3](62ff6f3))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-bigquery-reservation: 1.26.0</summary>

##
[1.26.0](google-cloud-bigquery-reservation-v1.25.0...google-cloud-bigquery-reservation-v1.26.0)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-bigquery-storage: 2.41.0</summary>

##
[2.41.0](google-cloud-bigquery-storage-v2.40.0...google-cloud-bigquery-storage-v2.41.0)
(2026-08-21)


### Features

* add pandas-gbq to optional extras
([#18020](#18020))
([fe91d93](fe91d93))
* **bigquery-storage:** add deprecation warning for to_dataframe
([#18022](#18022))
([57e7822](57e7822))
* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))


### Bug Fixes

* **storage:** support updated GapicCallable metadata in tests
([#18031](#18031))
([24fe2e3](24fe2e3))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-bigtable: 2.43.0</summary>

##
[2.43.0](google-cloud-bigtable-v2.42.0...google-cloud-bigtable-v2.43.0)
(2026-08-21)


### Features

* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-build: 3.39.0</summary>

##
[3.39.0](google-cloud-build-v3.38.1...google-cloud-build-v3.39.0)
(2026-08-21)


### Features

* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))
</details>

<details><summary>google-cloud-commerceproducer: 0.1.2</summary>

##
[0.1.2](google-cloud-commerceproducer-v0.1.1...google-cloud-commerceproducer-v0.1.2)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-compute: 1.51.0</summary>

##
[1.51.0](google-cloud-compute-v1.50.0...google-cloud-compute-v1.51.0)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-compute-v1beta: 0.12.2</summary>

##
[0.12.2](google-cloud-compute-v1beta-v0.12.1...google-cloud-compute-v1beta-v0.12.2)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-core: 2.7.0</summary>

##
[2.7.0](google-cloud-core-v2.6.1...google-cloud-core-v2.7.0)
(2026-08-21)


### Features

* **core:** implement PEP 0810 explicit lazy imports in
google-cloud-core
([#18052](#18052))
([5a7ed02](5a7ed02))


### Bug Fixes

* use lowercase x-goog-api-client header
([#18064](#18064))
([d465d1e](d465d1e))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-dataform: 0.11.3</summary>

##
[0.11.3](google-cloud-dataform-v0.11.2...google-cloud-dataform-v0.11.3)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))
</details>

<details><summary>google-cloud-datastore: 2.26.1</summary>

##
[2.26.1](google-cloud-datastore-v2.26.0...google-cloud-datastore-v2.26.1)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-dns: 0.37.1</summary>

##
[0.37.1](google-cloud-dns-v0.37.0...google-cloud-dns-v0.37.1)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-documentai-toolbox: 0.17.3</summary>

##
[0.17.3](google-cloud-documentai-toolbox-v0.17.2...google-cloud-documentai-toolbox-v0.17.3)
(2026-08-21)


### Bug Fixes

* **documentai-toolbox:** contain split_pdf output to output_path
([#18063](#18063))
([d206212](d206212))
* **documentai-toolbox:** enable autoescape in export_hocr_str
([#18140](#18140))
([0d671d2](0d671d2))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-error-reporting: 1.16.1</summary>

##
[1.16.1](google-cloud-error-reporting-v1.16.0...google-cloud-error-reporting-v1.16.1)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-firestore: 2.29.0</summary>

##
[2.29.0](google-cloud-firestore-v2.28.1...google-cloud-firestore-v2.29.0)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-iam: 2.25.0</summary>

##
[2.25.0](google-cloud-iam-v2.24.1...google-cloud-iam-v2.25.0)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-logging: 3.16.3</summary>

##
[3.16.3](google-cloud-logging-v3.16.2...google-cloud-logging-v3.16.3)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-monitoring-dashboards: 3.0.0</summary>

##
[3.0.0](google-cloud-monitoring-dashboards-v2.22.0...google-cloud-monitoring-dashboards-v3.0.0)
(2026-08-21)


### ⚠ BREAKING CHANGES

* Remove erroneous google/monitoring/dashboard clients
([#18165](#18165))

### Bug Fixes

* Remove erroneous google/monitoring/dashboard clients
([#18165](#18165))
([fb0c1b9](fb0c1b9))
</details>

<details><summary>google-cloud-ndb: 2.6.0</summary>

##
[2.6.0](google-cloud-ndb-v2.5.1...google-cloud-ndb-v2.6.0)
(2026-08-21)


### Features

* check python and dependency versions in bigquery and ndb
([#18075](#18075))
([62ff6f3](62ff6f3))


### Bug Fixes

* **ndb:** avoid unbound lock in delete callback
([#17969](#17969))
([c513b39](c513b39))
* **ndb:** use the single-argument generator.throw() signature
([#18159](#18159))
([dfb0e36](dfb0e36))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-oracledatabase: 0.6.2</summary>

##
[0.6.2](google-cloud-oracledatabase-v0.6.1...google-cloud-oracledatabase-v0.6.2)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-pubsub: 2.39.2</summary>

##
[2.39.2](google-cloud-pubsub-v2.39.1...google-cloud-pubsub-v2.39.2)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-recaptcha-enterprise: 1.33.0</summary>

##
[1.33.0](google-cloud-recaptcha-enterprise-v1.32.0...google-cloud-recaptcha-enterprise-v1.33.0)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-retail: 2.12.0</summary>

##
[2.12.0](google-cloud-retail-v2.11.0...google-cloud-retail-v2.12.0)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-runtimeconfig: 0.37.1</summary>

##
[0.37.1](google-cloud-runtimeconfig-v0.37.0...google-cloud-runtimeconfig-v0.37.1)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-spanner: 3.70.0</summary>

##
[3.70.0](google-cloud-spanner-v3.69.1...google-cloud-spanner-v3.70.0)
(2026-08-21)


### Features

* check python and dependency versions in spanner packages
([#18177](#18177))
([b4d9717](b4d9717))
* **spanner:** add DataBoost and auto_partition_mode support to DBAPI
driver
([#18161](#18161))
([5bc3899](5bc3899))


### Bug Fixes

* **spanner:** buffer returned rows in autocommit DML statements
([#18152](#18152))
([7f8a552](7f8a552))


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-storage: 3.14.0</summary>

##
[3.14.0](google-cloud-storage-v3.13.1...google-cloud-storage-v3.14.0)
(2026-08-21)


### Features

* **storage:** expose metadata parameter in asyncio gRPC calls
([#17634](#17634))
([aaa263d](aaa263d))
* **storage:** expose object_metadata on AsyncMultiRangeDownloader
([#17411](#17411))
([a0171ae](a0171ae))


### Bug Fixes

* **storage:** add retry support for finalize and close in
AsyncAppendableObjectWriter
([#17733](#17733))
([92bb6dc](92bb6dc))
* **storage:** ensure bidi-gRPC stream is cleaned up on open failure and
close
([#18119](#18119))
([ac0dfd1](ac0dfd1))
* **storage:** resume bidi reads after idle-stream aborts
([#18061](#18061))
([3fe1e21](3fe1e21))
* use lowercase x-goog-api-client header
([#18064](#18064))
([d465d1e](d465d1e))


### Documentation

* correct typos and grammar in README
([#16535](#16535))
([593a8b0](593a8b0))
* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-storage-control: 1.14.0</summary>

##
[1.14.0](google-cloud-storage-control-v1.13.0...google-cloud-storage-control-v1.14.0)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-cloud-support: 0.5.3</summary>

##
[0.5.3](google-cloud-support-v0.5.2...google-cloud-support-v0.5.3)
(2026-08-21)


### Features

* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))
</details>

<details><summary>google-cloud-testutils: 1.9.3</summary>

##
[1.9.3](google-cloud-testutils-v1.9.2...google-cloud-testutils-v1.9.3)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>google-cloud-vectorsearch: 0.11.2</summary>

##
[0.11.2](google-cloud-vectorsearch-v0.11.1...google-cloud-vectorsearch-v0.11.2)
(2026-08-21)


### Features

* update googleapis and regenerate
([#18087](#18087))
([db1622a](db1622a))
</details>

<details><summary>google-devicesandservices-health: 0.1.2</summary>

##
[0.1.2](google-devicesandservices-health-v0.1.1...google-devicesandservices-health-v0.1.2)
(2026-08-21)


### Features

* update sources and regenerate
([#18164](#18164))
([5ff8274](5ff8274))
</details>

<details><summary>google-resumable-media: 2.10.2</summary>

##
[2.10.2](google-resumable-media-v2.10.1...google-resumable-media-v2.10.2)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>googleapis-common-protos: 1.75.2</summary>

##
[1.75.2](googleapis-common-protos-v1.75.1...googleapis-common-protos-v1.75.2)
(2026-08-21)


### Documentation

* **django-spanner, common-protos:** centralize CONTRIBUTING.rst
pointers
([#18041](#18041))
([2b056ab](2b056ab))
</details>

<details><summary>pandas-gbq: 0.35.2</summary>

##
[0.35.2](pandas-gbq-v0.35.1...pandas-gbq-v0.35.2)
(2026-08-21)


### Bug Fixes

* **pandas-gbq:** reject backticks in parse_table_id
([#18156](#18156))
([f687060](f687060))
</details>

<details><summary>proto-plus: 1.28.4</summary>

##
[1.28.4](proto-plus-v1.28.3...proto-plus-v1.28.4)
(2026-08-21)


### Documentation

* **handwritten:** centralize CONTRIBUTING.rst pointers
([#17642](#17642))
([23b9499](23b9499))
</details>

<details><summary>sqlalchemy-spanner: 1.20.0</summary>

##
[1.20.0](sqlalchemy-spanner-v1.19.0...sqlalchemy-spanner-v1.20.0)
(2026-08-21)


### Features

* **sqlalchemy-spanner:** export MAX_SIZE constant
([#17922](#17922))
([e15c21d](e15c21d))
* **sqlalchemy-spanner:** native UUID data type support in dialect
([#17913](#17913))
([6431932](6431932))


### Bug Fixes

* bump sqlparse from 0.5.5 to 0.6.0 in /packages/sqlalchemy-spanner
([#18136](#18136))
([3ba7d02](3ba7d02))
* **sqlalchemy-spanner:** fix get_multi_indexes crash on SEARCH indexes
([#17907](#17907))
([5b2da81](5b2da81))
* **sqlalchemy-spanner:** register TOKENLIST in _type_map for reflection
([#17911](#17911))
([788208b](788208b))
</details>

---
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>
parthea pushed a commit that referenced this pull request Aug 31, 2026
@alextolpin
samples(bigquery-storage): add Arrow query results samples for query_…
1be6e3c
…and_wait and read_rows (#18126)

## Description

Adds documentation code snippets and system tests demonstrating
high-performance query result retrieval in Apache Arrow format with LZ4
compression using the BigQuery Storage API:

1. **`query_and_wait()` with Arrow format & LZ4 frame compression**
(`query_and_wait_arrow.py`):
- Demonstrates calling `client.query_and_wait()` with
`query_results_format=enums.QueryResultsFormat.ARROW` and
`compression_codec=enums.QueryResultsCompressionCodec.LZ4_FRAME`.
- Returns results as an iterable of `pyarrow.RecordBatch` via
`results.to_arrow_iterable()`.
- Wrapped in region tag: `[START bigquerystorage_query_and_wait_arrow]`.

2. **Direct `read_rows` on query job default stream**
(`read_rows_query_job.py`):
- Demonstrates directly reading query results using
`BigQueryReadClient.read_rows` against the job stream
`projects/{project}/locations/{location}/jobs/{job_id}/streams/_default`.
   - Deserializes schema and record batches safely via `pyarrow.ipc`.
- Wrapped in region tag: `[START bigquerystorage_read_rows_query_job]`.

3. **Tests & Dependencies**:
- Added `query_and_wait_arrow_test.py` and `read_rows_query_job_test.py`
verifying batch iteration and schema types.
- Added `pyarrow` dependency pins to
`samples/snippets/requirements.txt`.

Follow-up to #18027
Related to #18047

## Checklist
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
@ohmayr ohmayr mentioned this pull request Oct 20, 2026
fix(bigquery): raise when an Arrow batch arrives before its schema #18791
Merged
ohmayr added a commit that referenced this pull request Oct 20, 2026
@ohmayr
fix(bigquery): raise when an Arrow batch arrives before its schema (#…
7944a4c
…18791)

Raises an error when an Arrow record batch arrives before its schema.
Before, `download_arrow_from_job()` skipped such batches, so rows could
go missing from Arrow query results without any error.

The skip has been there since Arrow support was added in #18027, so this
fixes it on `main` on its own. #18651 (which reviewers flagged it on)
will rebase on top of this.

- Raises `ValueError` for a batch without a schema in the inline
`jobs.query` first page.
- Raises `ValueError` for a batch without a schema in the `ReadRows`
stream.
- Adds unit tests for both cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@daniel-sanche daniel-sanche daniel-sanche left review comments
@tswast tswast tswast approved these changes
@sycai sycai sycai approved these changes
+1 more reviewer
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@alextolpin alextolpin

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@alextolpin @parthea @tswast @daniel-sanche @sycai @chalmerlowe @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.