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 80f78206744d..f9f9b1b0b929 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 @@ void postFlush() { @Nullable TableSchema updatedTableSchema = (streamAppendClient != null) ? streamAppendClient.getUpdatedSchema() : null; - if (updatedTableSchema != null) { + if (updatedTableSchema != null && autoUpdateSchema) { invalidateWriteStream(); appendClientInfo = Preconditions.checkStateNotNull(getAppendClientInfo(false, updatedTableSchema));