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

Union defaults are not handled as per the specification

    XMLWordPrintableJSON

Details

    Description

      According to the union spec.

      Note that when a default value is specified for a record field whose type is a union, the type of the default value must match the first element of the union. Thus, for unions containing “null”, the “null” is usually listed first, since the default value of such unions is typically null

      I wonder if a PR would be accepted for this. I managed to add the check for the first element in the parser.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              woile Santiago Fraire Willemoes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m