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

Introduce annotation to specify default values

    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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: