yirutang commented on code in PR #24145:
URL: https://github.com/apache/beam/pull/24145#discussion_r1069686314
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/SplittingIterable.java:
##########
@@ -57,7 +84,37 @@ public ProtoRows next() {
while (underlyingIterator.hasNext()) {
StorageApiWritePayload payload = underlyingIterator.next();
ByteString byteString = ByteString.copyFrom(payload.getPayload());
-
+ if (autoUpdateSchema) {
+ try {
+ @Nullable TableRow unknownFields = payload.getUnknownFields();
+ if (unknownFields != null) {
+ // Protocol buffer serialization format supports
concatenation. We serialize any new
+ // "known" fields
+ // into a proto and concatenate to the existing proto.
+ try {
+ byteString =
+ byteString.concat(
Review Comment:
Yes, code looks good here.
--
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]