You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/20 12:36:08 UTC

[GitHub] [beam] steveniemitz commented on a diff in pull request #22348: Initial Commit for AvroPayloadSerializer

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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org