Skip to content

Commit 3cef963

Browse files
committed
docs(bigquery): add comments explaining insertId requirement for retries
1 parent 4236143 commit 3cef963

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it

java-bigquery/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2981,6 +2981,8 @@ void testInsertAll() throws IOException {
29812981
builder2.put("FloatField", 1.2);
29822982
builder2.put("GeographyField", "POINT(-122.350220 47.649154)");
29832983
builder2.put("NumericField", new BigDecimal("123456789.123456789"));
2984+
// Set insertId on all rows to enable automatic retries by the client library on transient
2985+
// errors.
29842986
InsertAllRequest request =
29852987
InsertAllRequest.newBuilder(tableInfo.getTableId())
29862988
.addRow(UUID.randomUUID().toString(), builder1.build())
@@ -3040,6 +3042,8 @@ void testInsertAllWithSuffix() throws InterruptedException {
30403042
builder2.put("FloatField", 1.2);
30413043
builder2.put("GeographyField", "POINT(-122.350220 47.649154)");
30423044
builder2.put("NumericField", new BigDecimal("123456789.123456789"));
3045+
// Set insertId on all rows to enable automatic retries by the client library on transient
3046+
// errors.
30433047
InsertAllRequest request =
30443048
InsertAllRequest.newBuilder(tableInfo.getTableId())
30453049
.addRow(UUID.randomUUID().toString(), builder1.build())
@@ -3114,6 +3118,8 @@ void testInsertAllWithErrors() {
31143118
builder3.put("IntegerArrayField", ImmutableList.of(0, 1));
31153119
builder3.put("BooleanField", false);
31163120
builder3.put("BytesField", BYTES_BASE64);
3121+
// Set insertId on all rows to enable automatic retries by the client library on transient
3122+
// errors.
31173123
InsertAllRequest request =
31183124
InsertAllRequest.newBuilder(tableInfo.getTableId())
31193125
.addRow(UUID.randomUUID().toString(), builder1.build())

0 commit comments

Comments
 (0)