-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added Query#fromProto to convert protobuf ReadRowsRequest #4291
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
Conversation
| public static Query fromProto(ReadRowsRequest request) { | ||
| Preconditions.checkArgument(request != null, "ReadRowsRequest must not be null"); | ||
|
|
||
| TableName tableName = TableName.parse(request.getTableName()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * and not meant to be used by applications. | ||
| */ | ||
| @InternalApi | ||
| public static Query fromProto(ReadRowsRequest request) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| String tableId = ""; | ||
| if (tableName != null) { | ||
| tableId = tableName.getTable(); | ||
| } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } | ||
|
|
||
| Query query = new Query(tableId); | ||
| query.builder = ReadRowsRequest.newBuilder(request); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
...ents/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java
Outdated
Show resolved
Hide resolved
| @Test | ||
| public void testFromProto() { | ||
| ReadRowsRequest request = ReadRowsRequest.newBuilder() | ||
| .setTableName(TABLE_NAME.toString()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } | ||
|
|
||
| @Test | ||
| public void testFromProtoWithEmptyTableId() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
igorbernstein2
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.
LGTM assuming the docs are updated
...ents/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java
Outdated
Show resolved
Hide resolved
| * Wraps the protobuf {@link ReadRowsRequest}. This method is considered an internal implementation detail | ||
| * and not meant to be used by applications. | ||
| * | ||
| * <p>WARNING: ProjectId & InstanceId of {@link ReadRowsRequest} would be ignored. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
|
CLAs look good, thanks! |
igorbernstein2
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.
LGTM
For fixes related to #4260
This PR is to add a method in Query.java