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

Introduce annotation to specify default values

    XMLWordPrintableJSON

Details

    Description

      It would be nice if there was an annotation in org.apache.avro.reflect to specify default values for schemata derived reflectively, allowing for proper schema evolution.

      I suggest the following:

      @AvroDefault(1)
      int someNum;
      
      @Nullable
      @AvroDefault(null)
      AnotherRecord myRec;
      

      Attachments

        1. AVRO-1400.patch
          3 kB
          Doug Cutting

        Activity

          People

            cutting Doug Cutting
            striderapache dennis lucero
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: