class SerDeUtil {

  public static Schema getSchemaFromAvro(String avroSchemaString) {
    org.apache.avro.Schema.Parser parser = new org.apache.avro.Schema.Parser();
    org.apache.avro.Schema avroSchema = parser.parse(avroSchemaString);

    SchemaBuilder inferredSchema = SchemaBuilder.struct().name(avroSchema.getName());
    for (org.apache.avro.Schema.Field avroField: avroSchema.getFields()) {
      inferredSchema.field(avroField.name(), getKsqlSchemaForAvroSchema(avroField.schema()));
    }

    return inferredSchema.build();
  }

}