Function interchange::avro::encode::build_schema[][src]

fn build_schema(
    columns: &[(ColumnName, ColumnType)],
    class_name: Option<&str>
) -> Schema
Expand description

Builds a Debezium-encoded Avro schema that corresponds to desc.

Requires that all column names in desc are present. The returned schema has some special properties to ease encoding:

  • Union schemas are only used to represent nullability. The first variant is always the null variant, and the second and last variant is the non-null variant.