Skip to content

fix(bigquery-derive): propagate compile errors for invalid bigquery attributes - #6876

Open
dbolduc wants to merge 1 commit into
googleapis:mainfrom
dbolduc:fix-bigquery-derive-attribute-errors
Open

dbolduc wants to merge 1 commit into
googleapis:mainfrom
dbolduc:fix-bigquery-derive-attribute-errors

Conversation

@dbolduc

@dbolduc dbolduc commented Sep 20, 2026

Copy link
Copy Markdown
Member

Fail compilation if there is an invalid macro attribute. (Previously it succeeded silently).

Fixes #6875

@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 the get_field_name helper function in the bigquery-derive crate to return a syn::Result<String> instead of a String, allowing proper propagation of parsing errors for invalid bigquery attributes. It also updates derive_from_row and derive_from_sql to validate all fields upfront and return compile errors if any attribute parsing fails, and adds corresponding unit tests to verify this behavior. There are no review comments, and I have no additional feedback to provide.

@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.57143% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.17%. Comparing base (fb2c65c) to head (81cc112).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/bigquery-derive/src/lib.rs 88.57% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6876      +/-   ##
==========================================
- Coverage   97.17%   97.17%   -0.01%     
==========================================
  Files         329      329              
  Lines      110459   110484      +25     
==========================================
+ Hits       107344   107366      +22     
- Misses       3115     3118       +3     

☔ 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.

@dbolduc
dbolduc marked this pull request as ready for review September 20, 2026 01:43
@dbolduc
dbolduc requested a review from a team as a code owner September 20, 2026 01:43
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.

BQ Query: error on unknown derive attribute in macros

1 participant