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

[rust] Derive Deserialize produces invalid Name struct

    XMLWordPrintableJSON

Details

    Description

      The Name struct derives the trait Deserialize, which allows it to be constructed from a JSON as shown in this test: https://github.com/apache/avro/blob/master/lang/rust/avro/tests/schema.rs#L1080

      (called test_fullname_fullname_and_namespace_specified())

      However, the derive flow does not parse out the namespace from the name which is handled correctly from both Name::new() and Name:: parse() , which leads to a struct this is invalid against what is expected.

      It would be nice to remove the derive Deserialize trait, and replace with a custom implementation or just removing the implementation all together (and double checking for side effects of that) 

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              Klamer Jack Klamer
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 40m
                  40m