Skip to content

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

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

tloszabno
Copy link
Contributor

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:

  • [x ] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #3735 ☕️

If you write sample code, please follow the samples format.

@tloszabno tloszabno requested a review from a team as a code owner March 24, 2025 14:09
@tloszabno tloszabno requested a review from GaoleMeng March 24, 2025 14:09
Copy link

google-cla bot commented Mar 24, 2025

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.

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/java-bigquery API. labels Mar 24, 2025
Copy link
Contributor

@PhongChuong PhongChuong left a 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"))
Copy link
Contributor

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());

Copy link
Contributor Author

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.

@PhongChuong
Copy link
Contributor

/gcbrun

@PhongChuong
Copy link
Contributor

@tloszabno ,
Looks good. Thank you for adding the suggestions.

Can you:

  1. Run mvn com.coveo:fmt-maven-plugin:format to fix formatting.
  2. Fix the CLA pre-merge failure, see https://github.com/googleapis/java-bigquery/blob/main/CONTRIBUTING.md#contributor-license-agreement

@PhongChuong PhongChuong added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Mar 25, 2025
@PhongChuong
Copy link
Contributor

/gcbrun

@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Mar 25, 2025
@PhongChuong PhongChuong added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Mar 25, 2025
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Mar 25, 2025
@PhongChuong
Copy link
Contributor

Thank you for the fix.

@PhongChuong PhongChuong merged commit 8634822 into googleapis:main Mar 25, 2025
17 checks passed
@tloszabno
Copy link
Contributor Author

@PhongChuong can you trigger a release for that fix #3739?
Or if the rules for release are different, when do you predict the release could happen?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/java-bigquery API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

listTables method doesn't pass table labels
3 participants