Skip to content

Fix nullness in BigQueryIO - #39893

Open
kennknowles wants to merge 1 commit into
apache:masterfrom
kennknowles:BigQueryIO-nullness
Open

Fix nullness in BigQueryIO#39893
kennknowles wants to merge 1 commit into
apache:masterfrom
kennknowles:BigQueryIO-nullness

Conversation

@kennknowles

Copy link
Copy Markdown
Member

BigQueryIO was identified as an area with a large amount of nullness errors and suppressions. This PR removes class level suppressions and fixes errors that were uncovered.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.12032% with 116 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.24%. Comparing base (87e31bd) to head (560b695).
⚠️ Report is 17 commits behind head on master.

Files with missing lines Patch % Lines
...eam/sdk/io/gcp/bigquery/BigQueryIOTranslation.java 64.49% 27 Missing and 22 partials ⚠️
...rg/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java 88.15% 10 Missing and 8 partials ⚠️
...igQueryStorageWriteApiSchemaTransformProvider.java 73.33% 5 Missing and 7 partials ⚠️
...apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java 86.36% 8 Missing and 1 partial ⚠️
...beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java 50.00% 5 Missing and 2 partials ⚠️
...ers/BigQueryDirectReadSchemaTransformProvider.java 70.00% 2 Missing and 4 partials ⚠️
...ery/BigQueryExportReadSchemaTransformProvider.java 73.33% 0 Missing and 4 partials ⚠️
...m/sdk/io/gcp/bigquery/UpdateSchemaDestination.java 50.00% 1 Missing and 3 partials ⚠️
...ders/BigQueryFileLoadsSchemaTransformProvider.java 69.23% 1 Missing and 3 partials ⚠️
...ache/beam/sdk/io/gcp/bigquery/BigQueryHelpers.java 75.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #39893      +/-   ##
============================================
- Coverage     58.65%   57.24%   -1.42%     
+ Complexity    15190     3661   -11529     
============================================
  Files          2781     1195    -1586     
  Lines        277838   193532   -84306     
  Branches      12274     3832    -8442     
============================================
- Hits         162954   110778   -52176     
+ Misses       108501    79174   -29327     
+ Partials       6383     3580    -2803     
Flag Coverage Δ
java 72.27% <77.12%> (+7.57%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @ahmedabu98 for label java.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@kennknowles

Copy link
Copy Markdown
Member Author

Added @Pure annotations to getters to reduce the amount of noise from temporary locals. (without @Pure checkerframework correctly assumes that a getter method could modify object state). I will let all the tests re-run to green like last time before I merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants