Avro
  1. Avro
  2. AVRO-289

Add tests for schema resolution to new Python implementation

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: python
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    1. AVRO-289.patch
      24 kB
      Jeff Hammerbacher

      Issue Links

        Activity

        Hide
        Doug Cutting added a comment -

        I just committed this. Thanks, Jeff!

        Show
        Doug Cutting added a comment - I just committed this. Thanks, Jeff!
        Hide
        Jeff Hammerbacher added a comment -

        Here's some tests for:

        1. if both are records:
        • the ordering of fields may be different: fields are matched by name.
        • schemas for fields with the same name in both records are resolved recursively.
        • if the writer's record contains a field with a name not present in the reader's record, the writer's value for that field is ignored.
        • if the reader's record schema has a field that contains a default value, and writer's schema does not have a field with the same name, then the reader should use the default value from its field.
        • if the reader's record schema has a field with no default value, and writer's schema does not have a field with the same name, then the field's value is unset.
        1. if both are enums:

        if the writer's symbol is not present in the reader's enum, then the enum's value is unset.

        Show
        Jeff Hammerbacher added a comment - Here's some tests for: if both are records: the ordering of fields may be different: fields are matched by name. schemas for fields with the same name in both records are resolved recursively. if the writer's record contains a field with a name not present in the reader's record, the writer's value for that field is ignored. if the reader's record schema has a field that contains a default value, and writer's schema does not have a field with the same name, then the reader should use the default value from its field. if the reader's record schema has a field with no default value, and writer's schema does not have a field with the same name, then the field's value is unset. if both are enums: if the writer's symbol is not present in the reader's enum, then the enum's value is unset.

          People

          • Assignee:
            Jeff Hammerbacher
            Reporter:
            Jeff Hammerbacher
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development