[ https://issues.apache.org/jira/browse/AVRO-3812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kousuke Saruta updated AVRO-3812: --------------------------------- Summary: Handle null namespace properly for canonicalized schema representation (was: Handle null namespace properly) > Handle null namespace properly for canonicalized schema representation > ---------------------------------------------------------------------- > > Key: AVRO-3812 > URL: https://issues.apache.org/jira/browse/AVRO-3812 > Project: Apache Avro > Issue Type: Improvement > Components: rust > Affects Versions: 1.12.0 > Reporter: Kousuke Saruta > Priority: Major > > Considering the following schema, which contains namespaces of "". > {code} > { > "namespace": "", > "type": "record", > "name": "my_schema", > "fields": [ > { > "name": "a", > "type": { > "type": "enum", > "name": "my_enum", > "namespace": "", > "symbols": ["a", "b"] > } > }, { > "name": "b", > "type": { > "type": "fixed", > "name": "my_fixed", > "namespace": "", > "size": 10 > } > } > ] > } > {code} > If we try to canonicalize this schema with the following code > {code} > let schema = Schema::parse_str(schema_str).unwrap().canonical_form(); > println!("{schema}"); > {code} > We get the following result. > {code} > {"name":".my_schema","type":"record","fields":[{"name":"a","type":{"name":".my_enum","type":"enum","symbols":["a","b"]}},{"name":"b","type":{"name":".my_fixed","type":"fixed","size":10}}]} > {code} > But .my_schema, .my_enum and .my_fixed should not starts with a dot. -- This message was sent by Atlassian Jira (v8.20.10#820010)