Skip to content

refactor(bigquery): Standardize SimpleQuery samples as used across multiple technologies#10280

Open
Kef131 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Kef131:refactor(bigquery)_standarize_SimpleQuery_using_same_table_as_other_languages
Open

refactor(bigquery): Standardize SimpleQuery samples as used across multiple technologies#10280
Kef131 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Kef131:refactor(bigquery)_standarize_SimpleQuery_using_same_table_as_other_languages

Conversation

@Kef131

@Kef131 Kef131 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes b/468097867

Updated the BigQuery simple query sample SimpleQuery.java and its integration test SimpleQueryIT.java to query the bigquery-public-data.usa_names.usa_1910_2013 public dataset instead of the old bigquery-public-data.samples.shakespeare dataset. This standardizes the query across samples in other languages.

Additionally:

  • Fixed a class reference ambiguity for Role in Util.java by using fully-qualified references for Acl.Role.
  • Added jacoco-maven-plugin configuration with version 0.8.12 to pom.xml to resolve compatibility issues when instrumenting code under Java 21+ environments.

Reference on other technologies: https://docs.cloud.google.com/bigquery/docs/running-queries#python

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration (uses the workspace standard version 1.2.0)
  • Appropriate changes to README are included in PR
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Tests pass: mvn clean verify required (verified SimpleQueryIT integration test passes)
  • Lint passes: mvn -P lint checkstyle:check required (0 checkstyle violations found on modified/added files)
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only (Skipped due to JDK 25 compatibility issues with configured ErrorProne plugin version during compilation)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

…e configuration in order to standarize SImpleQuery example
@product-auto-label product-auto-label Bot added api: bigquery Issues related to the BigQuery API. samples Issues that are directly related to samples. labels Jun 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new BigQuery sample SimpleQuery.java along with its integration test SimpleQueryIT.java. It also adds the JaCoCo plugin to the Maven build configuration for test coverage reporting, cleans up unused imports and fully qualifies Acl classes in Util.java to resolve naming conflicts, and removes an obsolete markdown file. The reviewer recommended improving the integration test by calling SimpleQuery.main directly to avoid duplicating the SQL query string and to ensure the main entry point is properly tested.

@Kef131 Kef131 self-assigned this Jun 11, 2026
@Kef131 Kef131 marked this pull request as ready for review June 11, 2026 23:54
@Kef131 Kef131 requested review from a team and yoshi-approver as code owners June 11, 2026 23:54
@snippet-bot

snippet-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

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 BigQuery API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant