From c4ab51c71ce42b7dd9e45bc968a69a4ea196e9b3 Mon Sep 17 00:00:00 2001 From: Yiru Tang Date: Thu, 22 Sep 2022 23:12:32 +0000 Subject: [PATCH] . --- .../google/cloud/bigquery/storage/v1/JsonStreamWriter.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java index e6892475a6..6ef655781b 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java @@ -73,11 +73,7 @@ private JsonStreamWriter(Builder builder) this.descriptor = BQTableSchemaToProtoDescriptor.convertBQTableSchemaToProtoDescriptor(builder.tableSchema); - if (this.client == null) { - streamWriterBuilder = StreamWriter.newBuilder(builder.streamName); - } else { - streamWriterBuilder = StreamWriter.newBuilder(builder.streamName, builder.client); - } + streamWriterBuilder = StreamWriter.newBuilder(builder.streamName); this.protoSchema = ProtoSchemaConverter.convert(this.descriptor); this.totalMessageSize = protoSchema.getSerializedSize(); streamWriterBuilder.setWriterSchema(protoSchema);