Avro GenericRecord support was introduced in
FLINK-3691, but it seems like the GenericRecords are not properly (de)serialized.
This can be easily seen with a program like this:
which will print records in which all fields have the same value:
If I'm not mistaken, the AvroInputFormat does essentially TypeExtractor.getForClass(GenericRecord.class), but GenericRecords are not POJOs.
Furthermore, each GenericRecord contains a pointer to the record schema. I guess the current naive approach will serialize this schema with each record, which is quite inefficient (the schema is typically more complex and much larger than the data). We probably need a TypeInformation and TypeSerializer specific to Avro GenericRecords, which could just use avro serialization.