Skip to content
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

Update BigQuery storage read API usage to v1 #10035

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

kmjung
Copy link
Contributor

@kmjung kmjung commented Nov 22, 2021

This change updates the BigQuery connector to use the v1 interface for the BigQuery read API in preparation for the eventual turndown of v1beta1.

@cla-bot cla-bot bot added the cla-signed label Nov 22, 2021
@ebyhr ebyhr requested review from hashhar and ebyhr November 23, 2021 00:26
Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost good to me. Do you know whether a retryable message of BigQueryUtil.INTERNAL_ERROR_MESSAGES is valid after updating to v1?

@kmjung
Copy link
Contributor Author

kmjung commented Nov 23, 2021

Do you know whether a retryable message of BigQueryUtil.INTERNAL_ERROR_MESSAGES is valid after updating to v1?

The definitions are still valid, although they may no longer be required since some of this logic is now implemented directly in the client (see e.g. here). Would you like me to remove them, either as part of this PR or later?

@kmjung
Copy link
Contributor Author

kmjung commented Nov 23, 2021

It should also be safe to remove e.g. BigQueryUtils.validColumnName, since the read API now supports BigQuery pseudo-columns.

Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skimmed. couple of comments. I'm reviewing changes between the API versions to see if there are any other functional changes we should make on our end.

Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash commits into one.

Update BigQuery storage protos to v1

Update plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQuerySplitManager.java

Co-authored-by: Yuya Ebihara <ebyhry@gmail.com>

Update plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryPageSourceProvider.java

Co-authored-by: Yuya Ebihara <ebyhry@gmail.com>

Update plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/ReadSessionCreator.java

Co-authored-by: Yuya Ebihara <ebyhry@gmail.com>

Fix code review feedback: rename member variable

Revert unneeded pom.xml changes
@kmjung kmjung force-pushed the bigquery_storage_v1 branch from bb615bc to 33f2fff Compare November 24, 2021 00:37
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % comment

@hashhar hashhar merged commit 24afd8d into trinodb:master Nov 24, 2021
@github-actions github-actions bot added this to the 365 milestone Nov 24, 2021
@kmjung kmjung deleted the bigquery_storage_v1 branch November 24, 2021 17:28
v-jizhang added a commit to v-jizhang/presto that referenced this pull request Sep 14, 2022
Cherry-pick of trinodb/trino#10035

Co-authored-by: Kenneth Jung <kmjung@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants