Skip to content

Commit e96c8dd

Browse files
authored
Remove dead code. (#36943)
* Remove dead code. * Lint.
1 parent dbf4e5a commit e96c8dd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiDynamicDestinationsGenericRecord.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.google.protobuf.Message;
2525
import org.apache.avro.Schema;
2626
import org.apache.avro.generic.GenericRecord;
27-
import org.apache.beam.sdk.extensions.avro.schemas.utils.AvroUtils;
2827
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryServices.DatasetService;
2928
import org.apache.beam.sdk.transforms.SerializableFunction;
3029
import org.checkerframework.checker.nullness.qual.NonNull;
@@ -63,13 +62,11 @@ class GenericRecordConverter implements MessageConverter<T> {
6362

6463
final com.google.cloud.bigquery.storage.v1.TableSchema protoTableSchema;
6564
final Schema avroSchema;
66-
final TableSchema bqTableSchema;
6765
final Descriptor descriptor;
6866
final @javax.annotation.Nullable Descriptor cdcDescriptor;
6967

7068
GenericRecordConverter(DestinationT destination) throws Exception {
7169
avroSchema = schemaFactory.apply(getSchema(destination));
72-
bqTableSchema = BigQueryUtils.toTableSchema(AvroUtils.toBeamSchema(avroSchema));
7370
protoTableSchema =
7471
AvroGenericRecordToStorageApiProto.protoTableSchemaFromAvroSchema(avroSchema);
7572
descriptor =
@@ -112,7 +109,7 @@ public TableRow toFailsafeTableRow(T element) {
112109
return formatRecordOnFailureFunction.apply(null, element);
113110
} else {
114111
return BigQueryUtils.convertGenericRecordToTableRow(
115-
toGenericRecord.apply(new AvroWriteRequest<>(element, avroSchema)), bqTableSchema);
112+
toGenericRecord.apply(new AvroWriteRequest<>(element, avroSchema)));
116113
}
117114
}
118115

0 commit comments

Comments
 (0)