ahmedabu98 commented on code in PR #28274:
URL: https://github.com/apache/beam/pull/28274#discussion_r1326446314


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java:
##########
@@ -669,9 +668,17 @@ public GenericDatumTransformer(
         String tableSchema,
         org.apache.avro.Schema writer) {
       this.parseFn = parseFn;
-      this.tableSchema =
-          Suppliers.memoize(
-              Suppliers.compose(new TableSchemaFunction(), 
Suppliers.ofInstance(tableSchema)));
+      this.tableSchema = new TableSchemaFunction().apply(tableSchema);

Review Comment:
   +1 to removing `TableSchemaFunction` and the constructor, it can't be 
accessed by users anyways. We can get the tableschema from json directly with 
`BigQueryHelpers.fromJsonString(tableschema, TableSchema.class)`



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

Reply via email to