Skip to content

feat(BigQuery): add StorageWriteApi arrow support#435

Merged
yoshidan merged 3 commits into
yoshidan:mainfrom
sdf-jkl:arrow-write-api
May 17, 2026
Merged

feat(BigQuery): add StorageWriteApi arrow support#435
yoshidan merged 3 commits into
yoshidan:mainfrom
sdf-jkl:arrow-write-api

Conversation

@sdf-jkl

@sdf-jkl sdf-jkl commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Hi, I need StorageWriteApi to support Arrow for a project I'm working on.

Changes

  • Updated arrow-rs dependency
  • Added arrow schema support for StorageWriteApi
  • Added unit tests

@sdf-jkl sdf-jkl changed the title feat: add StorageWriteApi arrow support feat(BigQuery): add StorageWriteApi arrow support Apr 21, 2026
@sdf-jkl

sdf-jkl commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

Hi @yoshidan, could you please tell me how to run the CI?

@yoshidan yoshidan added the safe to test safe to test label Apr 27, 2026
@yoshidan

Copy link
Copy Markdown
Owner

Hi @yoshidan, could you please tell me how to run the CI?

CI triggers are restricted to maintainers, so I have executed it for you.

The errors in check-deps and check-lint have already been fixed in the main branch. You can resolve them by rebasing or merging the latest main into your branch.

@sdf-jkl

sdf-jkl commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

@yoshidan ready for another CI run!

@yoshidan yoshidan added safe to test safe to test and removed safe to test safe to test labels May 7, 2026
@yoshidan

yoshidan commented May 9, 2026

Copy link
Copy Markdown
Owner

The check-deps is still failing, but since the changes are limited to BigQuery, it should be fine. Please move it out of Draft to "Ready for Review," and I’ll review and merge it.

@sdf-jkl sdf-jkl marked this pull request as ready for review May 9, 2026 13:38
@sdf-jkl

sdf-jkl commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

@yoshidan Ready for review!

I can update the hickory dev:

error[vulnerability]: CPU exhaustion during message encoding due to O(n²) name compression
    ┌─ /github/workspace/Cargo.lock:126:1
    │
126 │ hickory-proto 0.25.2 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
    │
    ├ ID: RUSTSEC-2026-0119
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2026-0119
    ├ During message encoding, `hickory-proto`'s `BinEncoder` stores pointers to
      labels that are candidates for name compression in a `Vec<(usize, Vec<u8>)>`.
      The name compression logic then searches for matches with a linear scan.
      
      A malicious message with many records can both introduce many candidate labels,
      and invoke this linear scan many times. This can amplify CPU exhaustion in DoS
      attacks.
      
      This is similar to
      [CVE-2024-8508](https://www.nlnetlabs.nl/downloads/unbound/CVE-2024-8508.txt).
      
      We recommend all affected users update to `hickory-proto` 0.26.1 for the fix.
    ├ Announcement: https://github.com/hickory-dns/hickory-dns/security/advisories/GHSA-q2qq-hmj6-3wpp
    ├ Solution: Upgrade to >=0.26.1 (try `cargo update -p hickory-proto`)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds Arrow payload support to the BigQuery Storage Write API path, addressing the requested support for Arrow schemas and record batches alongside existing Protobuf rows.

Changes:

  • Adds Arrow-backed AppendRowsRequestBuilder payload handling and RecordBatch serialization.
  • Adds unit coverage for Arrow serialization round-tripping.
  • Adds an authenticated storage write test for Arrow rows and updates the Arrow dependency.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
bigquery/src/storage_write/mod.rs Adds Arrow payload support and serialization from RecordBatch.
bigquery/src/storage_write/stream/mod.rs Adds a shared Arrow test request helper.
bigquery/src/storage_write/stream/default.rs Adds default stream Arrow write test coverage.
bigquery/Cargo.toml Updates the Arrow dependency version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yoshidan yoshidan merged commit 25f0c56 into yoshidan:main May 17, 2026
12 of 13 checks passed
@yoshidan

Copy link
Copy Markdown
Owner

LGTM!

@sdf-jkl sdf-jkl deleted the arrow-write-api branch May 17, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test safe to test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add support for Arrow in BigQuery Storage Write API

3 participants