From 6b730fd791cf6c102acb8e94eceb0fdcc298b0d8 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Fri, 29 Mar 2024 15:39:24 -0700 Subject: [PATCH 1/5] Fix @Nullable annotations on builder methods This fixes errors in the latest versions of AutoValue ``` google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java:225: error: [AutoValueBuilderSetterNullable] Setter methods always return the Builder so @Nullable is not appropriate public abstract Builder setUseReadAPI(Boolean useReadAPI); ^ ``` --- .../java/com/google/cloud/bigquery/ConnectionSettings.java | 3 +-- .../cloud/bigquery/ReadClientConnectionConfiguration.java | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java index a9aabe038..1d5801064 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java @@ -221,8 +221,7 @@ Builder withDefaultValues() { * * @param useReadAPI or {@code true} for none */ - @Nullable - public abstract Builder setUseReadAPI(Boolean useReadAPI); + public abstract Builder setUseReadAPI(@Nullable Boolean useReadAPI); /** * Sets how long to wait for the query to complete, in milliseconds, before the request times diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java index e0805a11e..c484f68fa 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java @@ -18,7 +18,6 @@ import com.google.auto.value.AutoValue; import java.io.Serializable; -import javax.annotation.Nullable; /** Represents BigQueryStorage Read client connection information. */ @AutoValue @@ -31,21 +30,18 @@ public abstract static class Builder { * Sets the total row count to page row count ratio used to determine whether to us the * BigQueryStorage Read client to fetch result sets after the first page. */ - @Nullable public abstract Builder setTotalToPageRowCountRatio(Long ratio); /** * Sets the minimum number of table rows in the query results used to determine whether to us * the BigQueryStorage Read client to fetch result sets after the first page. */ - @Nullable public abstract Builder setMinResultSize(Long numRows); /** * Sets the maximum number of table rows allowed in buffer before streaming them to the * BigQueryResult. */ - @Nullable public abstract Builder setBufferSize(Long bufferSize); /** Creates a {@code ReadClientConnectionConfiguration} object. */ From 177870dda60b9ff948a2c830dcb4b02793062830 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 17 Apr 2024 18:02:34 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f824e6199..cc0001a9c 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ 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.34.0') +implementation platform('com.google.cloud:libraries-bom:26.37.0') implementation 'com.google.cloud:google-cloud-bigquery' ``` From 3e3a94387838c279217e20238d0d8606cae9dc4c Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Mon, 22 Apr 2024 11:57:48 -0700 Subject: [PATCH 3/5] Review comments --- .../com/google/cloud/bigquery/ConnectionSettings.java | 5 ++--- .../bigquery/ReadClientConnectionConfiguration.java | 10 +++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java index 1d5801064..aabb7b54c 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java @@ -36,8 +36,7 @@ public abstract class ConnectionSettings { * Returns useReadAPI flag, enabled by default. Read API will be used if the underlying conditions * are satisfied and this flag is enabled */ - @Nullable - public abstract Boolean getUseReadAPI(); + public abstract boolean getUseReadAPI(); /** Returns the synchronous response timeoutMs associated with this query */ @Nullable @@ -221,7 +220,7 @@ Builder withDefaultValues() { * * @param useReadAPI or {@code true} for none */ - public abstract Builder setUseReadAPI(@Nullable Boolean useReadAPI); + public abstract Builder setUseReadAPI(boolean useReadAPI); /** * Sets how long to wait for the query to complete, in milliseconds, before the request times diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java index c484f68fa..2b1e25004 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java @@ -18,6 +18,7 @@ import com.google.auto.value.AutoValue; import java.io.Serializable; +import javax.annotation.Nullable; /** Represents BigQueryStorage Read client connection information. */ @AutoValue @@ -30,31 +31,34 @@ public abstract static class Builder { * Sets the total row count to page row count ratio used to determine whether to us the * BigQueryStorage Read client to fetch result sets after the first page. */ - public abstract Builder setTotalToPageRowCountRatio(Long ratio); + public abstract Builder setTotalToPageRowCountRatio(@Nullable Long ratio); /** * Sets the minimum number of table rows in the query results used to determine whether to us * the BigQueryStorage Read client to fetch result sets after the first page. */ - public abstract Builder setMinResultSize(Long numRows); + public abstract Builder setMinResultSize(@Nullable Long numRows); /** * Sets the maximum number of table rows allowed in buffer before streaming them to the * BigQueryResult. */ - public abstract Builder setBufferSize(Long bufferSize); + public abstract Builder setBufferSize(@Nullable Long bufferSize); /** Creates a {@code ReadClientConnectionConfiguration} object. */ public abstract ReadClientConnectionConfiguration build(); } /** Returns the totalToPageRowCountRatio in this configuration. */ + @Nullable public abstract Long getTotalToPageRowCountRatio(); /** Returns the minResultSize in this configuration. */ + @Nullable public abstract Long getMinResultSize(); /** Returns the bufferSize in this configuration. */ + @Nullable public abstract Long getBufferSize(); public abstract Builder toBuilder(); From c0e8000a6d6870059c043e8f973d97cbad6703d6 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Tue, 23 Apr 2024 10:14:47 -0700 Subject: [PATCH 4/5] Review comments --- .../google/cloud/bigquery/ConnectionSettings.java | 5 +++-- .../bigquery/ReadClientConnectionConfiguration.java | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java index aabb7b54c..79bc3aac9 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionSettings.java @@ -36,7 +36,8 @@ public abstract class ConnectionSettings { * Returns useReadAPI flag, enabled by default. Read API will be used if the underlying conditions * are satisfied and this flag is enabled */ - public abstract boolean getUseReadAPI(); + @Nullable + public abstract Boolean getUseReadAPI(); /** Returns the synchronous response timeoutMs associated with this query */ @Nullable @@ -220,7 +221,7 @@ Builder withDefaultValues() { * * @param useReadAPI or {@code true} for none */ - public abstract Builder setUseReadAPI(boolean useReadAPI); + public abstract Builder setUseReadAPI(Boolean useReadAPI); /** * Sets how long to wait for the query to complete, in milliseconds, before the request times diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java index 2b1e25004..03cc2140e 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ReadClientConnectionConfiguration.java @@ -31,34 +31,34 @@ public abstract static class Builder { * Sets the total row count to page row count ratio used to determine whether to us the * BigQueryStorage Read client to fetch result sets after the first page. */ - public abstract Builder setTotalToPageRowCountRatio(@Nullable Long ratio); + public abstract Builder setTotalToPageRowCountRatio(Long ratio); /** * Sets the minimum number of table rows in the query results used to determine whether to us * the BigQueryStorage Read client to fetch result sets after the first page. */ - public abstract Builder setMinResultSize(@Nullable Long numRows); + public abstract Builder setMinResultSize(Long numRows); /** * Sets the maximum number of table rows allowed in buffer before streaming them to the * BigQueryResult. */ - public abstract Builder setBufferSize(@Nullable Long bufferSize); + public abstract Builder setBufferSize(Long bufferSize); /** Creates a {@code ReadClientConnectionConfiguration} object. */ public abstract ReadClientConnectionConfiguration build(); } /** Returns the totalToPageRowCountRatio in this configuration. */ - @Nullable + @Nullable public abstract Long getTotalToPageRowCountRatio(); /** Returns the minResultSize in this configuration. */ - @Nullable + @Nullable public abstract Long getMinResultSize(); /** Returns the bufferSize in this configuration. */ - @Nullable + @Nullable public abstract Long getBufferSize(); public abstract Builder toBuilder(); From 2ccfa96839a5d811cacfa1873616b8d37c579d70 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 24 Apr 2024 13:45:34 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cc0001a9c..d7279f7ea 100644 --- a/README.md +++ b/README.md @@ -60,13 +60,13 @@ implementation 'com.google.cloud:google-cloud-bigquery' If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigquery:2.38.2' +implementation 'com.google.cloud:google-cloud-bigquery:2.39.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.38.2" +libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.39.0" ``` @@ -351,7 +351,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-bigquery/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-bigquery.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery/2.38.2 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquery/2.39.0 [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