Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6218#discussion_r199778602
  
    --- Diff: 
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/AvroRowDeserializationSchema.java
 ---
    @@ -148,25 +148,26 @@ public AvroRowDeserializationSchema(Class<? extends 
SpecificRecord> recordClazz)
        public AvroRowDeserializationSchema(String avroSchemaString) {
                Preconditions.checkNotNull(avroSchemaString, "Avro schema must 
not be null.");
                recordClazz = null;
    -           typeInfo = AvroSchemaConverter.convert(avroSchemaString);
    +           final TypeInformation<?> typeInfo = 
AvroSchemaConverter.convertToTypeInfo(avroSchemaString);
    +           // check for a schema that describes a record
    +           if (!(typeInfo instanceof RowTypeInfo)) {
    +                   throw new IllegalArgumentException("Row type 
information expected.");
    --- End diff --
    
    `Preconditions.checkArgument`?


---

Reply via email to