suztomo commented on a change in pull request #14563:
URL: https://github.com/apache/beam/pull/14563#discussion_r614922543



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -1138,18 +1136,7 @@ public void unpin() throws Exception {
         @Override
         public ApiFuture<AppendRowsResponse> appendRows(
             long offset, ProtoRows rows, Descriptor descriptor) throws 
Exception {
-          final AppendRowsRequest.ProtoData data =
-              AppendRowsRequest.ProtoData.newBuilder()
-                  .setWriterSchema(
-                      
ProtoSchema.newBuilder().setProtoDescriptor(descriptor.toProto()).build())
-                  .setRows(rows)
-                  .build();
-          AppendRowsRequest.Builder appendRequestBuilder =
-              
AppendRowsRequest.newBuilder().setProtoRows(data).setWriteStream(streamName);
-          if (offset >= 0) {
-            appendRequestBuilder = 
appendRequestBuilder.setOffset(Int64Value.of(offset));
-          }
-          return streamWriter.append(appendRequestBuilder.build());
+          return streamWriter.append(rows, offset);

Review comment:
       @yayi-google (I saw your name on 
https://github.com/googleapis/java-bigquerystorage/pull/924/files). I 
appreciate if you can help here. Do you know a good way to adjust this Beam 
code for the method removal?
   (I don't use Beam or Bigquery; I just want to upgrade the library in Beam)




-- 
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.

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


Reply via email to