macro classtoSchema extends Annotation with StaticAnnotation
Macro annotation for case classes to be saved to Avro files.
Note that this annotation does not generate case classes, only a companion object with
convenience methods. You need to define a complete case class for as output record. For
example:
It is recommended that you define all of your fields as Option.
This way you could stop populating them in the future if you notice that you don't need them.
This macro doesn't help you with schema evolution.
It's up to you to follow the best practices on how to do evolution of your Avro schemas.
Rule of thumb is to only add new fields, without removing the old ones.
Macro annotation for case classes to be saved to Avro files.
Note that this annotation does not generate case classes, only a companion object with convenience methods. You need to define a complete case class for as output record. For example:
It is recommended that you define all of your fields as Option. This way you could stop populating them in the future if you notice that you don't need them.
This macro doesn't help you with schema evolution. It's up to you to follow the best practices on how to do evolution of your Avro schemas. Rule of thumb is to only add new fields, without removing the old ones.