feat(spanner): add support for Proto Columns in Connection API by harshachinta · Pull Request #3123 · googleapis/java-spanner (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation11 Commits37 Checks26 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

harshachinta

Adds support for Proto Columns feature in the Connection API.
This PR is taken from #2495.

@gauravpurohit06

Commit will be reverted, once PROTO changes are available publicly.

Adding default implementation for newly added methods ByteArray compatability changes for Proto Messages

Adding Additional check for ChecksumResultSet

  1. Adding docs and formatting the code.
  2. Adding additional methods for enum and message which accepts descriptors.

-Modified Docs/Comments -Minor Refactoring

-code review comments -adding function docs

@gauravpurohit06

googleapis#2211)

@gauravpurohit06

@gauravpurohit06

@gauravpurohit06 @pjuhos

Co-authored-by: Pavol Juhos pjuhos@google.com

@harshachinta

@harshachinta

@harshachinta

…to validate main branch update

@gcf-owl-bot

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

… fix autogenerated client side statement tests

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@harshachinta

@generated-files-bot Generated Files Bot

Warning: This pull request is touching the following templated files:

@harshachinta harshachinta changed the titlefeat(spanner): add support for Proto Columns to Connection API feat(spanner): add support for Proto Columns in Connection API

May 23, 2024

@harshachinta

olavloite

Comment on lines +1944 to +1946

// reset proto descriptors after executing a DDL statement
this.protoDescriptors = null;
this.protoDescriptorsFilePath = null;

Choose a reason for hiding this comment

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

Would it make more sense to move this to setDefaultTransactionOptions()? It keeps the code cleaner, as we have all the reset code in one method, but it does mean that executing for example a query after setting the proto descriptors also clears the fields. One option to prevent the latter could be to add an input argument to setDefaultTransactionOptions() that indicates the type of statement that was executed, and only reset these fields if the last statement was a DDL statement.

Choose a reason for hiding this comment

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

sure, will check if it makes sense to move that logic to setDefaultTransactionOptions() as a seperate PR. This PR is very big that the code review will be difficult. Will work on this immediately.

Choose a reason for hiding this comment

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

This comment will be addressed in PR #3126

private final String instanceId;
private final String databaseName;
static class Builder {
private DatabaseAdminClient dbAdminClient;
private String projectId;

Choose a reason for hiding this comment

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

nit: Instead of adding this field, could we change the individual fields projectId, instanceId, databaseName into one field of type DatabaseId?

Choose a reason for hiding this comment

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

sure, will do this along with the previous comment as a seperate PR.

Choose a reason for hiding this comment

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

This comment will be addressed in PR #3126

@harshachinta

Labels

api: spanner

Issues related to the googleapis/java-spanner API.

size: xl

Pull request size is extra large.