use of org.apache.samza.sql.schema.SqlSchemaBuilder in project samza by apache.
the class AvroTypeFactoryImpl method convertSchema.
private SqlSchema convertSchema(List<Schema.Field> fields, boolean isTopLevelField) {
SqlSchemaBuilder schemaBuilder = SqlSchemaBuilder.builder();
for (Schema.Field field : fields) {
SqlFieldSchema fieldSchema = convertField(field.schema(), false, isOptional(field, isTopLevelField));
schemaBuilder.addField(field.name(), fieldSchema);
}
return schemaBuilder.build();
}
Aggregations