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

Error in AVRO specification

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.11.1
    • doc

    Description

      On http://avro.apache.org/docs/current/spec.html#binary_encode_primitive the example given for encoding Unions appears to have an error:

      For example, the union schema ["null","string"] would encode:

      null as zero (the index of "null" in the union):
      00
      the string "a" as one (the index of "string" in the union, encoded as hex 02), followed by the serialized string:
      02 02 61

      Surely the "string" in the union is encoded as hex 01...  It is defined as "the zero-based position within the union of the schema".  The list has only two entries, so 02 is not a valid index.

      Attachments

        Issue Links

          Activity

            People

              owvhk Oscar Westra van Holthe - Kind
              davejohncole Dave Cole
              Votes:
              0 Vote for this issue
              Watchers:
              6 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 - 0.5h
                  0.5h