refactor(bigquery): Standardize SimpleQuery samples as used across multiple technologies#10280
Conversation
…e configuration in order to standarize SImpleQuery example
There was a problem hiding this comment.
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.
|
Here is the summary of changes. You are about to add 1 region tag.This comment is generated by snippet-bot.
|
Description
Fixes b/468097867
Updated the BigQuery simple query sample
SimpleQuery.javaand its integration testSimpleQueryIT.javato query thebigquery-public-data.usa_names.usa_1910_2013public dataset instead of the oldbigquery-public-data.samples.shakespearedataset. This standardizes the query across samples in other languages.Additionally:
Rolein Util.java by using fully-qualified references forAcl.Role.jacoco-maven-pluginconfiguration with version0.8.12topom.xmlto 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
pom.xmlparent set to latestshared-configuration(uses the workspace standard version1.2.0)mvn clean verifyrequired (verifiedSimpleQueryITintegration test passes)mvn -P lint checkstyle:checkrequired (0 checkstyle violations found on modified/added files)mvn -P lint clean compile pmd:cpd-check spotbugs:checkadvisory only (Skipped due to JDK 25 compatibility issues with configured ErrorProne plugin version during compilation)