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(pandas-gbq): add arrow decoder for read rows response by shuoweil · Pull Request #17958 · googleapis/google-cloud-python

Conversation

@shuoweil

@shuoweil shuoweil commented Jul 30, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Adds pandas_gbq.arrow.from_read_rows_response to decode BigQuery Storage Read API ReadRowsResponse protobuf messages into pyarrow.RecordBatch instances.

Changes

  • pandas_gbq/arrow.py: Implements from_read_rows_response(message, arrow_schema=None) to deserialize IPC stream and message buffers with empty-batch fallback.
  • pandas_gbq/__init__.py: Exposes arrow in package __all__.
  • tests/unit/test_arrow.py: Adds unit tests for valid batch parsing, empty message handling, and missing pyarrow error handling.

Fixes #<540939659> 🦕

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
@shuoweil
feat(pandas-gbq): add arrow decoder for read rows response
f9d547a
@shuoweil
shuoweil requested review from GarrettWu, chalmerlowe, sycai and tswast July 30, 2026 21:28
@shuoweil shuoweil self-assigned this Jul 30, 2026
@shuoweil
shuoweil requested review from a team as code owners July 30, 2026 21:28
gemini-code-assist[bot]
gemini-code-assist Bot reviewed Jul 30, 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 a new arrow integration submodule in pandas-gbq to decode ReadRowsResponse protobuf messages into pyarrow.RecordBatch objects, along with corresponding unit tests. The review feedback points out that pyarrow.Message does not have a schema attribute, which would cause decoding to fail or fall back incorrectly. Additionally, it is recommended to catch specific pyarrow.ArrowException errors instead of using broad except Exception blocks.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/pandas-gbq/pandas_gbq/arrow.py Resolved

Uh oh!

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

shuoweil and others added 2 commits July 30, 2026 14:32
@shuoweil @gemini-code-assist
Update packages/pandas-gbq/pandas_gbq/arrow.py
622c007
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@shuoweil
fix(pandas-gbq): catch OSError in arrow IPC deserialization
108fca3
@parthea

parthea commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@shuoweil, Please can you merge main into this branch to resolve the issue with the presubmit checks? all-tests and mypy-status. These checks were added in #17438

shuoweil reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@parthea parthea mentioned this pull request Jul 31, 2026
feat: add pandas-gbq capability helper #17957
Merged
@shuoweil
Merge branch 'main' into shuowei-gbq-pandas-gbq-arrow
60369a0
@shuoweil

shuoweil commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@shuoweil, Please can you merge main into this branch to resolve the issue with the presubmit checks? all-tests and mypy-status. These checks were added in #17438

Thanks, Anthonios!

All reactions

Sorry, something went wrong.

Uh oh!

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

sycai
sycai reviewed Aug 3, 2026
View reviewed changes
Comment thread packages/pandas-gbq/tests/unit/test_arrow.py Outdated
mock_message = mock.MagicMock()

with mock.patch.object(pandas_gbq.arrow, "pa", None):
import pytest

@sycai sycai Aug 3, 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: let's import pytest at the top of the file.

Sorry, something went wrong.

Uh oh!

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

All reactions

@shuoweil shuoweil Aug 3, 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.

Done, I move import pytest to the top-level imports.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/pandas-gbq/tests/unit/test_arrow.py
import pyarrow as pa

import pandas_gbq.arrow

@sycai sycai Aug 3, 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.

Could we add a test case where the arrow schema is not provided?

Sorry, something went wrong.

Uh oh!

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

All reactions

@shuoweil shuoweil Aug 3, 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.

Sure, test case is added.

Sorry, something went wrong.

Uh oh!

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

All reactions
shuoweil added 2 commits August 3, 2026 19:21
@shuoweil
Merge branch 'main' into shuowei-gbq-pandas-gbq-arrow
4fdf3bf
@shuoweil
test(pandas-gbq): add test cases without arrow schema
9106559
@shuoweil
shuoweil requested a review from sycai August 3, 2026 19:27
sycai
sycai approved these changes Aug 3, 2026
View reviewed changes
@shuoweil
shuoweil merged commit e1df28c into main Aug 3, 2026
42 of 43 checks passed

Uh oh!

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

@shuoweil
shuoweil deleted the shuowei-gbq-pandas-gbq-arrow branch August 3, 2026 23:02
@release-please release-please Bot mentioned this pull request Aug 3, 2026
chore(main): release pandas-gbq 0.35.1 #17496
Merged
shuoweil pushed a commit that referenced this pull request Aug 6, 2026
@release-please
chore(main): release pandas-gbq 0.35.1 (#17496)
453a77d
🤖 I have created a release *beep* *boop*
---


##
[0.35.1](pandas-gbq-v0.35.0...pandas-gbq-v0.35.1)
(2026-08-06)


### Features

* **pandas-gbq:** add arrow decoder for read rows response
([#17958](#17958))
([e1df28c](e1df28c))


### Bug Fixes

* require Protobuf 6.33.5+
([#17743](#17743))
([d267342](d267342))


### Documentation

* add project ID to pandas-gbq run sample
([#17692](#17692))
([bd5d1a4](bd5d1a4))

---
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>
@shuoweil shuoweil mentioned this pull request Aug 31, 2026
feat: add user-agent delegation telemetry for pandas-gbq #18184
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sycai sycai sycai approved these changes
@tswast tswast Awaiting requested review from tswast
@GarrettWu GarrettWu Awaiting requested review from GarrettWu
@chalmerlowe chalmerlowe Awaiting requested review from chalmerlowe
+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

@shuoweil shuoweil

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.

3 participants

@shuoweil @parthea @sycai
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.