This is an automated email from the ASF dual-hosted git repository.

riteshghorse pushed a commit to branch release-2.48.0
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/release-2.48.0 by this push:
     new 14ba6185e25 Only use updated schema if auto update is enabled (#26791)
14ba6185e25 is described below

commit 14ba6185e25302510d03c7c39e06faa0df249539
Author: Bruno Volpato <[email protected]>
AuthorDate: Fri May 19 13:35:56 2023 -0400

    Only use updated schema if auto update is enabled (#26791)
---
 .../beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
 
b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
index 80f78206744..f9f9b1b0b92 100644
--- 
a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
+++ 
b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
@@ -691,7 +691,7 @@ public class StorageApiWriteUnshardedRecords<DestinationT, 
ElementT>
           @Nullable
           TableSchema updatedTableSchema =
               (streamAppendClient != null) ? 
streamAppendClient.getUpdatedSchema() : null;
-          if (updatedTableSchema != null) {
+          if (updatedTableSchema != null && autoUpdateSchema) {
             invalidateWriteStream();
             appendClientInfo =
                 Preconditions.checkStateNotNull(getAppendClientInfo(false, 
updatedTableSchema));

Reply via email to