yirutang commented on code in PR #24145:
URL: https://github.com/apache/beam/pull/24145#discussion_r1067578112
##########
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:
Maybe I missed something, so every time we will concat the unknown fields
with the existing byte string? Then what's the difference between this and
passing down the entire message? Maybe the unknownFieldsToMessage will filter
something out? But I don't see it has a schema.
--
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]