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

Better error information when new record field has no default

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.6
    • Component/s: None
    • Labels:
      None

      Description

      Currently, if you add a field to a schema without a default, and attempt to read a record with the new schema that was written with the old (pre-field-creation) schema, you get an error like this:

      org.apache.avro.AvroTypeException: Found mypackage.MyRecordType, expecting mypackage.MyRecordType

      This message is accurate, but doesn't help the user recognize the real problem: there's a required field that isn't present in the written data. Please enhance the error message to make it more informative.

        Attachments

        1. AVRO-1394.patch
          4 kB
          David Carr
        2. AVRO-1394.patch
          0.8 kB
          David Carr

          Activity

            People

            • Assignee:
              david@carr.name David Carr
              Reporter:
              david@carr.name David Carr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: