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

Validate that field defaults have the correct type

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.8.2
    • 1.9.0
    • ruby
    • None

    Description

      Currently, on the master branch, when a schema is parsed, it is possible to define a field with a type and a default of a totally different type. E.g. if the field has type "string", the default can be set to "null".

      I'd like to open a PR which will fix this by running the default through the SchemaValidator whenever a new Field is created. See https://github.com/salsify/avro-patches/pull/16

      cc: tjwp

      Attachments

        1. AVRO-2199.patch
          6 kB
          Tim Perkins

        Activity

          People

            tjwp Tim Perkins
            daniel.orner Daniel Orner
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: