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

ReflectData should determine inner class names in a different way.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.7
    • Fix Version/s: 1.9.0
    • Component/s: None
    • Labels:
      None

      Description

      I used ReflectData to generate schemas containing inner classes. These classes were named automatically by ReflectData with dollar ('$'), with, for example com.company.avro.House$Type. Nevertheless @AvroAlias does not support aliases containing '$' in names. In particulr, it fails in validateName in Schema core class. The failure is correct given that AVRO name specs does notinclude the '$' symbol.

      I suppose that ReflectData should, for example, generate inner class names in a different way, such as replacing '$' by dots ('.'), or it should fail.

      And a detail: Although I cannot add aliases with '$', I can still encode and decode such objects and inner classes using that schema.

      I think that it newer versions it is also happening.
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cutting Doug Cutting
                Reporter:
                elmendavies Miguel
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: