Avro
  1. Avro
  2. AVRO-635

ruby fully-qualified namespace mixed with unqualified breaks

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ruby
    • Labels:
      None

      Description

      Data interop tests fail when ruby tries to read a python-generated data file with:

      Avro::SchemaParseError: "org.apache.avro.Node" is not a schema we know about.

      1. py.avro
        1 kB
        Doug Cutting

        Activity

        Hide
        Martin Kleppmann added a comment -

        I believe this was fixed in AVRO-1272. Could you confirm?

        Show
        Martin Kleppmann added a comment - I believe this was fixed in AVRO-1272 . Could you confirm?
        Hide
        Doug Cutting added a comment -

        Slipping this to 1.6.

        Show
        Doug Cutting added a comment - Slipping this to 1.6.
        Hide
        Doug Cutting added a comment -

        With AVRO-639, this no longer blocks the 1.4.0 release. It's still a bug, but not a regression so shouldn't block the release now that data interop tests pass again.

        Show
        Doug Cutting added a comment - With AVRO-639 , this no longer blocks the 1.4.0 release. It's still a bug, but not a regression so shouldn't block the release now that data interop tests pass again.
        Hide
        Doug Cutting added a comment -

        A more minimal schema that I believe will demonstrate this problem is:

        {"type": "record", "name": "x.Y", "fields": [
        {"type": {"type": "record", "name": "Z", "fields": [

        {"name" "f", "type": "x.Z"}

        ]}]}

        Show
        Doug Cutting added a comment - A more minimal schema that I believe will demonstrate this problem is: {"type": "record", "name": "x.Y", "fields": [ {"type": {"type": "record", "name": "Z", "fields": [ {"name" "f", "type": "x.Z"} ]}]}
        Hide
        Doug Cutting added a comment -

        If the attached file is placed in build/interop/data, then 'rake interop' fails.

        The schema in this file is:

        {"type": "record", "namespace": "org.apache.avro", "name": "Interop", "fields": [

        {"type": "int", "name": "intField"}

        ,

        {"type": "long", "name": "longField"}

        ,

        {"type": "string", "name": "stringField"}

        ,

        {"type": "boolean", "name": "boolField"}

        ,

        {"type": "float", "name": "floatField"}

        ,

        {"type": "double", "name": "doubleField"}

        ,

        {"type": "bytes", "name": "bytesField"}

        ,

        {"type": "null", "name": "nullField"}

        ,
        {"type":

        {"items": "double", "type": "array"}

        , "name": "arrayField"},
        {"type": {"type": "map", "values": {"fields": [

        {"type": "string", "name": "label"}

        ], "type": "record", "name": "Foo"}}, "name": "mapField"},
        {"type": ["boolean", "double",

        {"items": "bytes", "type": "array"}

        ], "name": "unionField"},
        {"type":

        {"symbols": ["A", "B", "C"], "type": "enum", "name": "Kind"}

        , "name": "enumField"},
        {"type":

        {"type": "fixed", "name": "MD5", "size": 16}

        , "name": "fixedField"},
        {"type": {"fields": [

        {"type": "string", "name": "label"}

        , {"type":

        {"items": "org.apache.avro.Node", "type": "array"}

        , "name": "children"}], "type": "record", "name": "Node"}, "name": "recordField"}]}

        The problem I think is that the namespace of Node is not defaulted to the namespace of the containing Interop record.

        Show
        Doug Cutting added a comment - If the attached file is placed in build/interop/data, then 'rake interop' fails. The schema in this file is: {"type": "record", "namespace": "org.apache.avro", "name": "Interop", "fields": [ {"type": "int", "name": "intField"} , {"type": "long", "name": "longField"} , {"type": "string", "name": "stringField"} , {"type": "boolean", "name": "boolField"} , {"type": "float", "name": "floatField"} , {"type": "double", "name": "doubleField"} , {"type": "bytes", "name": "bytesField"} , {"type": "null", "name": "nullField"} , {"type": {"items": "double", "type": "array"} , "name": "arrayField"}, {"type": {"type": "map", "values": {"fields": [ {"type": "string", "name": "label"} ], "type": "record", "name": "Foo"}}, "name": "mapField"}, {"type": ["boolean", "double", {"items": "bytes", "type": "array"} ], "name": "unionField"}, {"type": {"symbols": ["A", "B", "C"], "type": "enum", "name": "Kind"} , "name": "enumField"}, {"type": {"type": "fixed", "name": "MD5", "size": 16} , "name": "fixedField"}, {"type": {"fields": [ {"type": "string", "name": "label"} , {"type": {"items": "org.apache.avro.Node", "type": "array"} , "name": "children"}], "type": "record", "name": "Node"}, "name": "recordField"}]} The problem I think is that the namespace of Node is not defaulted to the namespace of the containing Interop record.

          People

          • Assignee:
            Unassigned
            Reporter:
            Doug Cutting
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development