From c0b3c7ea616adef376f5428aaa19dde54f496383 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 20 Nov 2026 21:27:05 +0000 Subject: [PATCH 1/2] docs(bigquery): update package-info.java with API guidance and valid links Update com.google.cloud.bigquery package-info.java to: - Clarify package scope and direct new streaming ingestion and parallel large-table read workloads to google-cloud-bigquerystorage, with canonical links to BigQuery loading, Storage Write API (gRPC), and Storage Read API guides. - Fix stray '*' syntax errors in the table-creation snippet, add a client-reuse comment, and replace the archived googleapis/java-bigquery sample link with https://docs.cloud.google.com/bigquery/docs/samples?language=java. - Add @see com.google.cloud.bigquery.BigQuery and update the legacy cloud.google.com link to https://docs.cloud.google.com/bigquery/docs. Verified with fmt:check, checkstyle:check, test-compile, and javadoc -Xdoclint:all. --- .../google/cloud/bigquery/package-info.java | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/package-info.java b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/package-info.java index 85c3584fd6fe..523491b3d935 100644 --- a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/package-info.java +++ b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/package-info.java @@ -18,20 +18,30 @@ * A client for BigQuery – A fully managed, petabyte scale, low cost enterprise data warehouse for * analytics. * - *

A simple usage example showing how to create a table in Bigquery. For the complete source code - * see - * CreateTable.java. + *

Use {@link com.google.cloud.bigquery.BigQuery} in this package to manage datasets, tables, + * routines, models, and jobs, run SQL queries, and read paginated results. For new streaming + * ingestion workloads or reading large tables directly in parallel (Apache Arrow or Avro), prefer + * {@code google-cloud-bigquerystorage}. See Introduction to loading data, + * BigQuery Storage Write API + * (gRPC), and BigQuery + * Storage Read API for guidance on choosing between APIs. + * + *

A simple usage example showing how to create a table in BigQuery. For more Java examples, see + * BigQuery Java code + * samples. * *

{@code
- * BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService(); *
+ * // Initialize a client once and reuse it across multiple requests.
+ * BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
  * TableId tableId = TableId.of(datasetName, tableName);
  * TableDefinition tableDefinition = StandardTableDefinition.of(schema);
- * TableInfo tableInfo = TableInfo.newBuilder(tableId, tableDefinition).build(); *
+ * TableInfo tableInfo = TableInfo.newBuilder(tableId, tableDefinition).build();
  * bigquery.create(tableInfo);
- * System.out.println("Table created successfully");
  * }
* - * @see Google Cloud BigQuery + * @see com.google.cloud.bigquery.BigQuery + * @see Google Cloud BigQuery + * Documentation */ package com.google.cloud.bigquery; From 27f34f4b520c8f924c1fdd74cc65054922582723 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 20 Nov 2026 21:42:41 +0000 Subject: [PATCH 2/2] docs(bigquery): refine package-info.java links, Maven coordinate, and close comment --- .../com/google/cloud/bigquery/package-info.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/package-info.java b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/package-info.java index 523491b3d935..fef46e995a2f 100644 --- a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/package-info.java +++ b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/package-info.java @@ -21,18 +21,21 @@ *

Use {@link com.google.cloud.bigquery.BigQuery} in this package to manage datasets, tables, * routines, models, and jobs, run SQL queries, and read paginated results. For new streaming * ingestion workloads or reading large tables directly in parallel (Apache Arrow or Avro), prefer - * {@code google-cloud-bigquerystorage}. See Introduction to loading data, * BigQuery Storage Write API * (gRPC), and BigQuery * Storage Read API for guidance on choosing between APIs. * - *

A simple usage example showing how to create a table in BigQuery. For more Java examples, see - * BigQuery Java code + *

A simple usage example showing how to create a table in BigQuery. For the complete source + * code, see + * CreateTable.java. For additional examples, see BigQuery Java code * samples. * *

{@code
- * // Initialize a client once and reuse it across multiple requests.
+ * // Reuse a single client across requests and call close() on shutdown to release resources.
  * BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
  * TableId tableId = TableId.of(datasetName, tableName);
  * TableDefinition tableDefinition = StandardTableDefinition.of(schema);
@@ -41,7 +44,6 @@
  * }
* * @see com.google.cloud.bigquery.BigQuery - * @see Google Cloud BigQuery - * Documentation + * @see BigQuery documentation */ package com.google.cloud.bigquery;