ahmedabu98 commented on code in PR #33231:
URL: https://github.com/apache/beam/pull/33231#discussion_r1890560713


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWritesShardedRecords.java:
##########
@@ -531,6 +532,30 @@ public void process(
                       element.getKey().getKey(), dynamicDestinations, 
datasetService);
               tableSchema = converter.getTableSchema();
               descriptor = converter.getDescriptor(false);
+
+              if (autoUpdateSchema) {

Review Comment:
   We should always perform this check before creating a new StreamWriter , 
regardless of the reason for its creation. The only exception is if we already 
have an updated schema stored in state (see first `if` block above). If I'm 
following correctly, this method (`getAppendClientInfo`) will always [create a 
new stream 
writer](https://github.com/apache/beam/blob/d17f77a015d28b3008e80e647cf5e230310333c7/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWritesShardedRecords.java#L535-L554).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to