steveniemitz commented on code in PR #22348:
URL: https://github.com/apache/beam/pull/22348#discussion_r925552644


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java:
##########
@@ -439,25 +443,29 @@ public static <T> SerializableFunction<Row, T> 
getFromRowFunction(Class<T> clazz
 
   /** Returns a function mapping encoded AVRO {@link GenericRecord}s to Beam 
{@link Row}s. */
   public static SimpleFunction<byte[], Row> getAvroBytesToRowFunction(Schema 
beamSchema) {

Review Comment:
   Maybe it'd make sense here to allow users to pass in a factory for 
`DatumReader` and `DatumWriter` instances.  Then there could be this 
implementation, or others if users have their own.  This is similar to how 
[AvroIO.readFiles](https://beam.apache.org/releases/javadoc/2.39.0/org/apache/beam/sdk/io/AvroIO.ReadFiles.html#withDatumReaderFactory-org.apache.beam.sdk.io.AvroSource.DatumReaderFactory-)
 works.



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