@ SuppressWarnings ( "unchecked" ) public static < T > TypeInformation < T > convertToTypeInfo ( String avroSchemaString ) { Preconditions . checkNotNull ( avroSchemaString , "Avro schema must not be null." ) ; final Schema schema ; try { schema = new Schema . Parser ( ) . parse ( avroSchemaString ) ; } catch ( SchemaParseException e ) { throw new IllegalArgumentException ( "Could not parse Avro schema string." , e ) ; } return ( TypeInformation < T > ) convertToTypeInfo ( schema ) ; }
Converts an Avro schema string into a nested row structure with deterministic field order and data types that are compatible with Flink s Table & SQL API .