Avro
  1. Avro
  2. AVRO-1272

Ruby implementation does not handle namespaces correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.4
    • Fix Version/s: 1.7.5
    • Component/s: ruby
    • Labels:
      None

      Description

      The Ruby implementation of schema and protocol parsing violates the following statement in the Avro spec, with respect to name resolution: "the namespace is taken from the most tightly enclosing schema or protocol". Currently, any nested named types without explicit namespace property are taken as being in the default namespace, not in the enclosing schema/protocol's namespace.

      1. AVRO-1272.patch
        19 kB
        Martin Kleppmann

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        1h 33m 1 Martin Kleppmann 10/Mar/13 19:02
        Patch Available Patch Available Resolved Resolved
        8d 20h 42m 1 Doug Cutting 19/Mar/13 15:45
        Resolved Resolved Closed Closed
        154d 2h 1 Doug Cutting 20/Aug/13 18:46
        Doug Cutting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Hudson added a comment -

        Integrated in AvroJava #359 (See https://builds.apache.org/job/AvroJava/359/)
        AVRO-1272. Ruby: Improve schema namespace handling. Contributed by Martin Kleppmann. (Revision 1458349)

        Result = SUCCESS
        cutting :
        Files :

        • /avro/trunk/CHANGES.txt
        • /avro/trunk/lang/ruby/lib/avro/protocol.rb
        • /avro/trunk/lang/ruby/lib/avro/schema.rb
        • /avro/trunk/lang/ruby/test/test_protocol.rb
        • /avro/trunk/lang/ruby/test/test_schema.rb
        Show
        Hudson added a comment - Integrated in AvroJava #359 (See https://builds.apache.org/job/AvroJava/359/ ) AVRO-1272 . Ruby: Improve schema namespace handling. Contributed by Martin Kleppmann. (Revision 1458349) Result = SUCCESS cutting : Files : /avro/trunk/CHANGES.txt /avro/trunk/lang/ruby/lib/avro/protocol.rb /avro/trunk/lang/ruby/lib/avro/schema.rb /avro/trunk/lang/ruby/test/test_protocol.rb /avro/trunk/lang/ruby/test/test_schema.rb
        Doug Cutting made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee Martin Kleppmann [ martinkl ]
        Fix Version/s 1.7.5 [ 12324096 ]
        Resolution Fixed [ 1 ]
        Hide
        Doug Cutting added a comment -

        I committed this. Thanks, Martin!

        Show
        Doug Cutting added a comment - I committed this. Thanks, Martin!
        Hide
        Martin Kleppmann added a comment -

        Hi Doug, any chance you could take a look at this patch? Thanks!

        Show
        Martin Kleppmann added a comment - Hi Doug, any chance you could take a look at this patch? Thanks!
        Martin Kleppmann made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Martin Kleppmann made changes -
        Field Original Value New Value
        Attachment AVRO-1272.patch [ 12572978 ]
        Hide
        Martin Kleppmann added a comment -

        Attached a suite of test cases that reproduces the problem, and a patch that fixes it. I have had to add method parameters in various places, but I have made them optional, so this is a backwards-compatible API change.

        Show
        Martin Kleppmann added a comment - Attached a suite of test cases that reproduces the problem, and a patch that fixes it. I have had to add method parameters in various places, but I have made them optional, so this is a backwards-compatible API change.
        Martin Kleppmann created issue -

          People

          • Assignee:
            Martin Kleppmann
            Reporter:
            Martin Kleppmann
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development