diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 53ebea9e6a..01a5ce1602 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
- distribution: zulu
+ distribution: temurin
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
@@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
- distribution: zulu
+ distribution: temurin
java-version: 8
- run: java -version
- run: .kokoro/build.bat
@@ -66,17 +66,29 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
- distribution: zulu
+ distribution: temurin
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
+ javadoc:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ distribution: temurin
+ java-version: 17
+ - run: java -version
+ - run: .kokoro/build.sh
+ env:
+ JOB_TYPE: javadoc
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
- distribution: zulu
+ distribution: temurin
java-version: 11
- run: java -version
- run: .kokoro/build.sh
@@ -88,7 +100,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
- distribution: zulu
+ distribution: temurin
java-version: 8
- run: java -version
- run: .kokoro/build.sh
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6119b2db36..167f36f782 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,29 @@
# Changelog
+## [2.40.0](https://github.com/googleapis/java-bigquerystorage/compare/v2.39.1...v2.40.0) (2023-07-17)
+
+
+### Features
+
+* Add ResourceExhausted to retryable error for Write API unary calls ([#2178](https://github.com/googleapis/java-bigquerystorage/issues/2178)) ([d9b526a](https://github.com/googleapis/java-bigquerystorage/commit/d9b526a2e4109ef5ed95fb74373f2f13b06c7c54))
+* Improve json to proto conversion by caching schema ([#2179](https://github.com/googleapis/java-bigquerystorage/issues/2179)) ([afc550a](https://github.com/googleapis/java-bigquerystorage/commit/afc550aeacb0e3f26440eeb70d2cebbf65922c07))
+
+
+### Bug Fixes
+
+* Interpret Integer and Float values for TIMESTAMP as microseconds ([#2175](https://github.com/googleapis/java-bigquerystorage/issues/2175)) ([e5bb5d0](https://github.com/googleapis/java-bigquerystorage/commit/e5bb5d099ea0272c4bd447b7f8fef5207c14ffc5))
+* Support DATETIME field that has a space between date and time and has only date ([#2176](https://github.com/googleapis/java-bigquerystorage/issues/2176)) ([494ce85](https://github.com/googleapis/java-bigquerystorage/commit/494ce8513e8925b4330a2bf45641ba38db625c1d))
+
+
+### Dependencies
+
+* Update dependency com.google.auto.value:auto-value to v1.10.2 ([#2171](https://github.com/googleapis/java-bigquerystorage/issues/2171)) ([721908d](https://github.com/googleapis/java-bigquerystorage/commit/721908d412f1d82aff9aed8edcf727fc5b1bf950))
+* Update dependency com.google.auto.value:auto-value-annotations to v1.10.2 ([#2172](https://github.com/googleapis/java-bigquerystorage/issues/2172)) ([8a51fae](https://github.com/googleapis/java-bigquerystorage/commit/8a51fae180ced3b362acc350999157d3d6e0da6a))
+* Update dependency com.google.cloud:google-cloud-bigquery to v2.29.0 ([#2168](https://github.com/googleapis/java-bigquerystorage/issues/2168)) ([50ca432](https://github.com/googleapis/java-bigquerystorage/commit/50ca432854851f7cc89cb50a327d9641000b81ee))
+* Update dependency com.google.cloud:google-cloud-bigquery to v2.30.0 ([#2184](https://github.com/googleapis/java-bigquerystorage/issues/2184)) ([87f93a9](https://github.com/googleapis/java-bigquerystorage/commit/87f93a921c62cd71808cddc35382bbaabb7da54b))
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.13.0 ([#2180](https://github.com/googleapis/java-bigquerystorage/issues/2180)) ([7ce19e7](https://github.com/googleapis/java-bigquerystorage/commit/7ce19e7a4ca47df9590c1023abcc459248b1fec2))
+* Update dependency org.apache.avro:avro to v1.11.2 ([#2177](https://github.com/googleapis/java-bigquerystorage/issues/2177)) ([75ce0b5](https://github.com/googleapis/java-bigquerystorage/commit/75ce0b5d7009bbb47b91c222390cfe864b8bd84e))
+
## [2.39.1](https://github.com/googleapis/java-bigquerystorage/compare/v2.39.0...v2.39.1) (2023-06-22)
diff --git a/README.md b/README.md
index ac72bff3f6..9bf5e6afb5 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloudlibraries-bom
- 26.17.0
+ 26.18.0pomimport
@@ -42,7 +42,7 @@ If you are using Maven without the BOM, add this to your dependencies:
com.google.cloudgoogle-cloud-bigquerystorage
- 2.39.0
+ 2.39.1
```
@@ -50,20 +50,20 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:
```Groovy
-implementation platform('com.google.cloud:libraries-bom:26.17.0')
+implementation platform('com.google.cloud:libraries-bom:26.18.0')
implementation 'com.google.cloud:google-cloud-bigquerystorage'
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-bigquerystorage:2.39.0'
+implementation 'com.google.cloud:google-cloud-bigquerystorage:2.39.1'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "2.39.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "2.39.1"
```
@@ -220,7 +220,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigquerystorage/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerystorage.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerystorage/2.39.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerystorage/2.39.1
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/google-cloud-bigquerystorage-bom/pom.xml b/google-cloud-bigquerystorage-bom/pom.xml
index 1baf525d43..c497f44625 100644
--- a/google-cloud-bigquerystorage-bom/pom.xml
+++ b/google-cloud-bigquerystorage-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0com.google.cloudgoogle-cloud-bigquerystorage-bom
- 2.39.1
+ 2.40.0pomcom.google.cloud
@@ -52,37 +52,37 @@
com.google.cloudgoogle-cloud-bigquerystorage
- 2.39.1
+ 2.40.0com.google.api.grpcgrpc-google-cloud-bigquerystorage-v1beta1
- 0.163.1
+ 0.164.0com.google.api.grpcgrpc-google-cloud-bigquerystorage-v1beta2
- 0.163.1
+ 0.164.0com.google.api.grpcgrpc-google-cloud-bigquerystorage-v1
- 2.39.1
+ 2.40.0com.google.api.grpcproto-google-cloud-bigquerystorage-v1beta1
- 0.163.1
+ 0.164.0com.google.api.grpcproto-google-cloud-bigquerystorage-v1beta2
- 0.163.1
+ 0.164.0com.google.api.grpcproto-google-cloud-bigquerystorage-v1
- 2.39.1
+ 2.40.0
diff --git a/google-cloud-bigquerystorage/clirr-ignored-differences.xml b/google-cloud-bigquerystorage/clirr-ignored-differences.xml
index 96d4b3d595..1ce4f651e5 100644
--- a/google-cloud-bigquerystorage/clirr-ignored-differences.xml
+++ b/google-cloud-bigquerystorage/clirr-ignored-differences.xml
@@ -157,5 +157,17 @@
com/google/cloud/bigquery/storage/v1/JsonStreamWriterboolean isDone()
+
+ 7006
+ com/google/cloud/bigquery/storage/v1/ToProtoConverter
+ com.google.protobuf.DynamicMessage convertToProtoMessage(com.google.protobuf.Descriptors$Descriptor, com.google.cloud.bigquery.storage.v1.TableSchema, java.lang.Object, boolean)
+ java.util.List
+
+
+ 7005
+ com/google/cloud/bigquery/storage/v1/ToProtoConverter
+ com.google.protobuf.DynamicMessage convertToProtoMessage(com.google.protobuf.Descriptors$Descriptor, com.google.cloud.bigquery.storage.v1.TableSchema, java.lang.Object, boolean)
+ com.google.protobuf.DynamicMessage convertToProtoMessage(com.google.protobuf.Descriptors$Descriptor, com.google.cloud.bigquery.storage.v1.TableSchema, java.lang.Iterable, boolean)
+
diff --git a/google-cloud-bigquerystorage/pom.xml b/google-cloud-bigquerystorage/pom.xml
index 4ed2bae1f8..38aea24aa6 100644
--- a/google-cloud-bigquerystorage/pom.xml
+++ b/google-cloud-bigquerystorage/pom.xml
@@ -3,7 +3,7 @@
4.0.0com.google.cloudgoogle-cloud-bigquerystorage
- 2.39.1
+ 2.40.0jarBigQuery Storagehttps://github.com/googleapis/java-bigquerystorage
@@ -11,7 +11,7 @@
com.google.cloudgoogle-cloud-bigquerystorage-parent
- 2.39.1
+ 2.40.0google-cloud-bigquerystorage
@@ -75,12 +75,12 @@
com.google.auto.valueauto-value
- 1.10.1
+ 1.10.2com.google.auto.valueauto-value-annotations
- 1.10.1
+ 1.10.2com.google.protobuf
@@ -179,7 +179,7 @@
org.apache.avroavro
- 1.11.1
+ 1.11.2test
diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/CivilTimeEncoder.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/CivilTimeEncoder.java
index be2d1fd929..e52ada64d8 100644
--- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/CivilTimeEncoder.java
+++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/CivilTimeEncoder.java
@@ -30,6 +30,7 @@
*
The valid range and number of bits required by each date/time field is as the following:
*
*
+ *
Range and bits for date/time fields
*
Field
Range
#Bits
*
Year
[1, 9999]
14
*
Month
[1, 12]
4
diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java
index 7e86da4d81..1f0e1e1989 100644
--- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java
+++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java
@@ -843,7 +843,8 @@ private void requestCallback(AppendRowsResponse response) {
log.fine(
String.format(
- "Got response with schema updated (omitting updated schema in response here): %s writer id %s",
+ "Got response with schema updated (omitting updated schema in response here): %s"
+ + " writer id %s",
responseWithUpdatedSchemaRemoved.toString(), writerId));
}
diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/Exceptions.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/Exceptions.java
index 2f9083e4e9..8824e43c77 100644
--- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/Exceptions.java
+++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/Exceptions.java
@@ -243,10 +243,10 @@ public String getStreamName() {
}
/**
- * This exception is thrown from {@link SchemaAwareStreamWriter#append()} when the client side
- * Proto serialization fails. It can also be thrown by the server in case rows contains invalid
- * data. The exception contains a Map of indexes of faulty rows and the corresponding error
- * message.
+ * This exception is thrown from {@link SchemaAwareStreamWriter#append(Iterable)} when the client
+ * side Proto serialization fails. It can also be thrown by the server in case rows contains
+ * invalid data. The exception contains a Map of indexes of faulty rows and the corresponding
+ * error message.
*/
public static class AppendSerializationError extends AppendSerializtionError {
@@ -259,6 +259,29 @@ public AppendSerializationError(
}
}
+ /** This exception is thrown from proto converter to wrap the row index to error mapping. */
+ static class RowIndexToErrorException extends IllegalArgumentException {
+ Map rowIndexToErrorMessage;
+
+ boolean hasDataUnknownError;
+
+ public RowIndexToErrorException(
+ Map rowIndexToErrorMessage, boolean hasDataUnknownError) {
+ this.rowIndexToErrorMessage = rowIndexToErrorMessage;
+ this.hasDataUnknownError = hasDataUnknownError;
+ }
+
+ // This message should not be exposed to the user directly.
+ // Please examine individual row's error through `rowIndexToErrorMessage`.
+ public String getMessage() {
+ return "The map of row index to error message is " + rowIndexToErrorMessage.toString();
+ }
+
+ public boolean hasDataUnknownError() {
+ return hasDataUnknownError;
+ }
+ }
+
/** This exception is used internally to handle field level parsing errors. */
public static class FieldParseError extends IllegalArgumentException {
private final String fieldName;
@@ -344,7 +367,8 @@ protected InflightRequestsLimitExceededException(String writerId, long currentLi
super(
Status.fromCode(Status.Code.RESOURCE_EXHAUSTED)
.withDescription(
- "Exceeds client side inflight buffer, consider add more buffer or open more connections. Current limit: "
+ "Exceeds client side inflight buffer, consider add more buffer or open more"
+ + " connections. Current limit: "
+ currentLimit),
writerId,
currentLimit);
@@ -356,7 +380,8 @@ protected InflightBytesLimitExceededException(String writerId, long currentLimit
super(
Status.fromCode(Status.Code.RESOURCE_EXHAUSTED)
.withDescription(
- "Exceeds client side inflight buffer, consider add more buffer or open more connections. Current limit: "
+ "Exceeds client side inflight buffer, consider add more buffer or open more"
+ + " connections. Current limit: "
+ currentLimit),
writerId,
currentLimit);
diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java
index 0d47910e7b..79d2582a89 100644
--- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java
+++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java
@@ -54,8 +54,8 @@ private JsonStreamWriter(SchemaAwareStreamWriter.Builder