Skip to content

refactor(bigquery): genericize DefaultWriter - #6860

Merged
dbolduc merged 4 commits into
googleapis:mainfrom
dbolduc:bq-write-makeover-pr-4
Sep 18, 2026
Merged

dbolduc merged 4 commits into
googleapis:mainfrom
dbolduc:bq-write-makeover-pr-4

Conversation

@dbolduc

@dbolduc dbolduc commented Sep 18, 2026

Copy link
Copy Markdown
Member

This PR refactors the arrow::DefaultWriter and proto::DefaultWriter to share a common implementation.

The crate::write:::DefaultWriter<F> is ultimately the type we want to expose to applications. By the end of #6855 we will delete the other versions.

I decided we should expose the final types now because the docs are unusable if we try to hide them:

https://screenshot-v2.corp.google.com/1c0t3ta9teocg

vs.

https://screenshot-v2.corp.google.com/2fm1nq03p61g0

Towards #6855, #6762

@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Sep 18, 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 refactors DefaultWriter to be generic over the data format (DefaultWriter<F>), moving it to a shared write module to support both Arrow and Proto formats. Feedback on these changes includes correcting the import paths in the tests module of default.rs to use super:: instead of super::super::, and deriving Clone on DefaultWriter to facilitate sharing across asynchronous tasks without introducing double indirection.

Comment thread src/bigquery/src/write/default.rs
Comment thread src/bigquery/src/write/default.rs
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.18%. Comparing base (9925abe) to head (d86d1a5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6860      +/-   ##
==========================================
- Coverage   97.18%   97.18%   -0.01%     
==========================================
  Files         331      330       -1     
  Lines      110482   110394      -88     
==========================================
- Hits       107373   107283      -90     
- Misses       3109     3111       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/bigquery/src/write/default.rs
@dbolduc
dbolduc marked this pull request as ready for review September 18, 2026 22:15
@dbolduc
dbolduc requested a review from a team as a code owner September 18, 2026 22:15
@dbolduc
dbolduc merged commit 0c2c082 into googleapis:main Sep 18, 2026
42 checks passed
@dbolduc
dbolduc deleted the bq-write-makeover-pr-4 branch September 18, 2026 23:00
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants