You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Brennan Vincent (Jira)" <ji...@apache.org> on 2020/12/08 17:51:00 UTC

[jira] [Created] (AVRO-3002) Seemingly contradictory requirements in 1.10.1 spec

Brennan Vincent created AVRO-3002:
-------------------------------------

             Summary:  Seemingly contradictory requirements in 1.10.1 spec
                 Key: AVRO-3002
                 URL: https://issues.apache.org/jira/browse/AVRO-3002
             Project: Apache Avro
          Issue Type: Bug
          Components: spec
    Affects Versions: 1.10.1
            Reporter: Brennan Vincent


I also sent this to the user@ mailing list, but since I think it could be a genuine bug in the spec, it probably merits a JIRA issue.

We are generating some Avro schemas where some type names had a leading 
dot, to indicate the null namespace. For example:

```
{
     "type": "record",
     "name": ".envelope",
     "fields": [ ... ]
}
```

This seems fine according to my reading of the 1.9.2 spec, but 
explicitly disallowed by this language in the 1.10.1 spec: "The null 
namespace may not be used in a dot-separated sequence of names."

So, my interpretation of 1.10.1 is that we have to write something like:

```
{
     "type": "record",
     "name": "envelope",
     "namespace": "",
     "fields": [ ... ]
}
```

However, this is explicitly _disallowed_ by the definition of Parsing 
Canonical Form, which requires `namespace` attributes to be stripped: 
"[FULLNAMES] Replace short names with fullnames, using applicable 
namespaces to do so. Then eliminate namespace attributes, which are now 
redundant."

Thus it seems now impossible to convert schemas into Parsing Canonical Form.

How can we get around this apparent inconsistency?




--
This message was sent by Atlassian Jira
(v8.3.4#803005)