-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix error in BigQueryUtils when retrieving non existent avro field #30720
Conversation
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
Assigning reviewers. If you would like to opt out of this review, comment R: @bvolpato for label java. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Run PostCommit_Java_Dataflow |
V2 PostCommit passed; V1 PostCommit failed quota issue on unrelated tests, merging for now |
…pache#30720) * dump the record schema in BigQueryUtils exception message for debugging purposes * include the right test * check if the field exists in the record before fetching it * add test, restore previous exception message * trigger V2 PostCommit as well
fixes #30730
fixes #30729
An integration test called
BigQueryIOStorageReadIT.testBigQueryStorageReadProjectionPushdown
is failing - this is because the pushdown optimizer projects the record retrieved from the bigquery by removing unusedstring_field
. Later thetoBeamRow
conversion method iterates through the beam schema's fields and tries to extract a value from the avro record for every such field, including the one that has been removed by the optimizer - avro version 1.8 didn't have a problem with attempting to get a value from non-existent field - it simply returnednull
, but things have changed in version 1.11, and now this operation throws an exception. The fix is to check whether the field exists in the record before attempting to fetch its value. Also - added a unit test specifically for this situationThank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.