Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/6026#discussion_r190170050
--- Diff:
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/AvroRowDeserializationSchema.java
---
@@ -76,19 +77,35 @@
*/
private SpecificRecord record;
+ /** Type information describing the result type.
+ *
+ */
+ private final TypeInformation<Row> typeInfo;
+
/**
* Creates a Avro deserialization schema for the given record.
*
* @param recordClazz Avro record class used to deserialize Avro's
record to Flink's row
*/
- public AvroRowDeserializationSchema(Class<? extends SpecificRecord>
recordClazz) {
+ public AvroRowDeserializationSchema(Class<? extends SpecificRecord>
recordClazz){
+ this(recordClazz, null);
+ }
+
+ /**
+ * Creates a Avro deserialization schema for the given record.
+ *
+ * @param recordClazz Avro record class used to deserialize Avro's
record to Flink's row
+ * @param typeInfo Type information describing the result type.
+ */
+ public AvroRowDeserializationSchema(Class<? extends SpecificRecord>
recordClazz, TypeInformation<Row> typeInfo) {
--- End diff --
This constructor is not required. We should always use the result of the
`AvroRecordClassConverter`.
---