-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Streaming read for BigQuery #36668
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
Streaming read for BigQuery #36668
Conversation
Summary of ChangesHello @stankiewicz, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request lays the groundwork for streaming data ingestion from BigQuery by introducing a dynamic read mechanism. It provides a foundational implementation for reading entire tables in parallel using the BigQuery Storage Read API, along with a concrete example to illustrate its usage. The changes are presented as a Minimum Viable Product (MVP) to gather feedback and guide further development towards robust streaming BigQuery integration. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
Assigning reviewers: R: @Abacn for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
bf475a3 to
1374d03
Compare
|
/gemini review |
There was a problem hiding this comment.
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 introduces a valuable new feature for streaming reads from BigQuery using the storage read API. The changes include a new BigQueryDynamicReadDescriptor, a readDynamically transform, a comprehensive example, and several new tests. The overall implementation is solid, but I have identified a few areas for improvement to enhance correctness, maintainability, and test robustness. My review includes suggestions to prevent a potential NullPointerException, fix an equals/hashCode contract violation, remove duplicated and dead code, and eliminate a hardcoded project ID in an integration test.
...oud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIODynamicQueryIT.java
Outdated
Show resolved
Hide resolved
...-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryStorageStreamSource.java
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/org/apache/beam/examples/cookbook/BigQueryStreamingTornadoes.java
Outdated
Show resolved
Hide resolved
...a/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
Outdated
Show resolved
Hide resolved
...a/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
Outdated
Show resolved
Hide resolved
|
R: @damccorm |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
|
IO direct is ooming on unrelated tests but I think I need to catch this oom. |
|
Run Java PreCommit |
damccorm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - just had one nit, but overall this LGTM
| @SchemaFieldName("legacySql") | ||
| @SchemaFieldNumber("3") | ||
| @Pure | ||
| abstract @Nullable Boolean getLegacySql(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: For consistency, can we call this getUseLegacySql
Line 973 in 6d24c3d
| abstract Builder<T> setUseLegacySql(Boolean useLegacySql); |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #36668 +/- ##
============================================
+ Coverage 56.53% 56.60% +0.06%
- Complexity 3381 3455 +74
============================================
Files 1203 1204 +1
Lines 183894 184593 +699
Branches 3490 3586 +96
============================================
+ Hits 103968 104481 +513
- Misses 76599 76747 +148
- Partials 3327 3365 +38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
MVP for streaming read using storage read API:
fixes: #35711
not supported yet:
Thank 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.mdwith 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.