damondouglas commented on code in PR #28274:
URL: https://github.com/apache/beam/pull/28274#discussion_r1322095401
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java:
##########
@@ -721,16 +728,9 @@ public static <T> TypedRead<T>
read(SerializableFunction<SchemaAndRecord, T> par
.setDatumReaderFactory(
(SerializableFunction<TableSchema,
AvroSource.DatumReaderFactory<T>>)
input -> {
- try {
- String jsonTableSchema =
BigQueryIO.JSON_FACTORY.toString(input);
- return (AvroSource.DatumReaderFactory<T>)
- (writer, reader) ->
- new GenericDatumTransformer<>(parseFn,
jsonTableSchema, writer);
Review Comment:
Analyzing the code further, I saw that the original
GenericDatumTransformer's constructor received a JSON string so that later it
would re-parse that JSON into a TableSchema again but via a Supplier function.
--
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]