From 30f4a250e3bfcd90e91c4043336d50fd82cd7714 Mon Sep 17 00:00:00 2001 From: Gaole Meng Date: Wed, 29 Jul 2026 22:39:41 +0000 Subject: [PATCH 1/4] fix: add documentation for insertall api that there's no default retry mechanism --- .../main/java/com/google/cloud/bigquery/BigQueryImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java index a5e91886d030..a7c1c6f42403 100644 --- a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java +++ b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java @@ -1657,6 +1657,12 @@ public Routine apply(com.google.api.services.bigquery.model.Routine routinePb) { } } + /** + * Inserts the specified rows into a table using the BigQuery insertAll API. + * Note: To prevent duplicate rows, this method does not perform automatic retries unless + * insert IDs are provided. Transient service errors (such as UNAVAILABLE) may be thrown and + * should be handled by the caller. + */ @Override public InsertAllResponse insertAll(InsertAllRequest request) { final TableId tableId = From 4a46d324f86e58e41249f6368d210999e750ff17 Mon Sep 17 00:00:00 2001 From: Gaole Meng Date: Mon, 3 Aug 2026 19:29:09 +0000 Subject: [PATCH 2/4] Add comment --- .../java/com/google/cloud/bigquery/BigQueryImpl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java index a7c1c6f42403..2ad09c33d7cb 100644 --- a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java +++ b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java @@ -1657,14 +1657,12 @@ public Routine apply(com.google.api.services.bigquery.model.Routine routinePb) { } } - /** - * Inserts the specified rows into a table using the BigQuery insertAll API. - * Note: To prevent duplicate rows, this method does not perform automatic retries unless - * insert IDs are provided. Transient service errors (such as UNAVAILABLE) may be thrown and - * should be handled by the caller. - */ @Override public InsertAllResponse insertAll(InsertAllRequest request) { + // This API inserts the specified rows into a table using the BigQuery insertAll API. + // Note: To prevent duplicate rows, this method does not perform automatic retries unless + // insert IDs are provided. Transient service errors (such as UNAVAILABLE) may be thrown and + // should be handled by the caller. final TableId tableId = request .getTable() From dca13e758bd7360f66c73947c50560d4eda3b56a Mon Sep 17 00:00:00 2001 From: Gaole Meng Date: Wed, 12 Aug 2026 20:19:05 +0000 Subject: [PATCH 3/4] Add comment for InsertAll retry behavior to interface --- .../src/main/java/com/google/cloud/bigquery/BigQuery.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java index f92cb96c377a..6911bcb001c2 100644 --- a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java +++ b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java @@ -1355,6 +1355,9 @@ public int hashCode() { * Sends an insert all request. * *

Example of inserting rows into a table without running a load job. + * To prevent duplicate rows, this method does not perform automatic retries unless + * insert IDs are provided. Transient service errors (such as UNAVAILABLE) may be thrown and + * should be handled by the caller when insert IDs are not provided. * *

{@code
    * String datasetName = "my_dataset_name";

From 9cb74762393cdd937a06c271f5fc6c451d8e702c Mon Sep 17 00:00:00 2001
From: Gaole Meng 
Date: Wed, 12 Aug 2026 23:21:21 +0000
Subject: [PATCH 4/4] format

---
 .../src/main/java/com/google/cloud/bigquery/BigQuery.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java
index 6911bcb001c2..9fca8b042100 100644
--- a/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java
+++ b/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java
@@ -1354,10 +1354,10 @@ public int hashCode() {
   /**
    * Sends an insert all request.
    *
-   * 

Example of inserting rows into a table without running a load job. - * To prevent duplicate rows, this method does not perform automatic retries unless - * insert IDs are provided. Transient service errors (such as UNAVAILABLE) may be thrown and - * should be handled by the caller when insert IDs are not provided. + *

Example of inserting rows into a table without running a load job. To prevent duplicate + * rows, this method does not perform automatic retries unless insert IDs are provided. Transient + * service errors (such as UNAVAILABLE) may be thrown and should be handled by the caller when + * insert IDs are not provided. * *

{@code
    * String datasetName = "my_dataset_name";