"type": SchemaType.RECORD, "name": "Record", "fields": [{ "name": "Field", "type": { "type": SchemaType.ENUM, "name": "Enum", "symbols": ["A", "B"], "default": "B", }, "default": "A", }], })) EMPTY_UNION_SCHEMA = UnionSchema([], names=Names()) NULL_UNION_SCHEMA = UnionSchema([SchemaType.NULL], names=Names()) INT_UNION_SCHEMA = UnionSchema([SchemaType.INT], names=Names()) LONG_UNION_SCHEMA = UnionSchema([SchemaType.LONG], names=Names()) FLOAT_UNION_SCHEMA = UnionSchema([SchemaType.FLOAT], names=Names()) DOUBLE_UNION_SCHEMA = UnionSchema([SchemaType.DOUBLE], names=Names()) STRING_UNION_SCHEMA = UnionSchema([SchemaType.STRING], names=Names()) BYTES_UNION_SCHEMA = UnionSchema([SchemaType.BYTES], names=Names()) INT_STRING_UNION_SCHEMA = UnionSchema([SchemaType.INT, SchemaType.STRING], names=Names()) STRING_INT_UNION_SCHEMA = UnionSchema([SchemaType.STRING, SchemaType.INT], names=Names()) INT_FLOAT_UNION_SCHEMA = UnionSchema([SchemaType.INT, SchemaType.FLOAT], names=Names()) INT_LONG_UNION_SCHEMA = UnionSchema([SchemaType.INT, SchemaType.LONG], names=Names())
"type": "record", "name": "Record", "fields": [{ "name": "Field", "type": { "type": "enum", "name": "Enum", "symbols": ["A", "B"], "default": "B" }, "default": "A" }] })) EMPTY_UNION_SCHEMA = UnionSchema([]) NULL_UNION_SCHEMA = UnionSchema([NULL_SCHEMA]) INT_UNION_SCHEMA = UnionSchema([INT_SCHEMA]) LONG_UNION_SCHEMA = UnionSchema([LONG_SCHEMA]) FLOAT_UNION_SCHEMA = UnionSchema([FLOAT_SCHEMA]) DOUBLE_UNION_SCHEMA = UnionSchema([DOUBLE_SCHEMA]) STRING_UNION_SCHEMA = UnionSchema([STRING_SCHEMA]) BYTES_UNION_SCHEMA = UnionSchema([BYTES_SCHEMA]) INT_STRING_UNION_SCHEMA = UnionSchema([INT_SCHEMA, STRING_SCHEMA]) STRING_INT_UNION_SCHEMA = UnionSchema([STRING_SCHEMA, INT_SCHEMA]) INT_FLOAT_UNION_SCHEMA = UnionSchema([INT_SCHEMA, FLOAT_SCHEMA]) INT_LONG_UNION_SCHEMA = UnionSchema([INT_SCHEMA, LONG_SCHEMA]) INT_LONG_FLOAT_DOUBLE_UNION_SCHEMA = UnionSchema( [INT_SCHEMA, LONG_SCHEMA, FLOAT_SCHEMA, DOUBLE_SCHEMA]) NULL_INT_ARRAY_UNION_SCHEMA = UnionSchema([NULL_SCHEMA, INT_ARRAY_SCHEMA]) NULL_INT_MAP_UNION_SCHEMA = UnionSchema([NULL_SCHEMA, INT_MAP_SCHEMA])