-
Notifications
You must be signed in to change notification settings - Fork 127
fix: Add labels to converter for listTables method (#3735) #3736
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
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
PR looks good.
Just a minor change suggested for the unit test.
Thanks for creating a fix.
@@ -155,6 +155,9 @@ public class BigQueryImplTest { | |||
TableInfo.of(TABLE_ID, TABLE_DEFINITION_WITH_RANGE_PARTITIONING); | |||
private static final TableInfo TABLE_INFO = TableInfo.of(TABLE_ID, TABLE_DEFINITION); | |||
private static final TableInfo OTHER_TABLE_INFO = TableInfo.of(OTHER_TABLE_ID, TABLE_DEFINITION); | |||
private static final TableInfo OTHER_TABLE_WITH_LABELS_INFO = TableInfo.newBuilder(OTHER_TABLE_ID, TABLE_DEFINITION) | |||
.setLabels(ImmutableMap.of("key", "value")) |
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. move ImmutableMap.of("key", "value") to static final var and use it in the validation. I.e.,
private static final ImmutableMap<String, String> TABLE_LABELS = ImmutableMap.of("key", "value");
...
private static final TableInfo OTHER_TABLE_WITH_LABELS_INFO = TableInfo.newBuilder(OTHER_TABLE_ID, TABLE_DEFINITION)
.setLabels(TABLE_LABELS)
.build();
...
assertEquals(TABLE_LABELS, page.getValues().iterator().next().getLabels());
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.
Hello @PhongChuong
Thank you for the review.
Suggestion applied.
/gcbrun |
@tloszabno , Can you:
|
/gcbrun |
Thank you for the fix. |
@PhongChuong can you trigger a release for that fix #3739? |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #3735 ☕️
If you write sample code, please follow the samples format.