Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3002

Seemingly contradictory requirements in 1.10.1 spec

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.10.1
    • Fix Version/s: None
    • Component/s: spec
    • Labels:
      None

      Description

      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?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              umanwizard Brennan Vincent
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: