Annotation Interface AvroDecimal


@Target({ANNOTATION_TYPE,FIELD}) @Retention(RUNTIME) public @interface AvroDecimal
When generate logical types is enabled, annotation instructs the AvroSchemaGenerator to declare the annotated property's logical type as "decimal" (LogicalTypes.Decimal). By default, the Avro type is "bytes" (Schema.Type.BYTES), unless the field is also annotated with AvroFixedSize, in which case the Avro type will be "fixed" (Schema.Type.FIXED).

This annotation is only used during Avro schema generation and does not affect data serialization or deserialization.

Since:
2.19
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    Maximum precision of decimals stored in this type.
    int
    Scale must be zero or a positive integer less than or equal to the precision.
  • Element Details

    • precision

      int precision
      Maximum precision of decimals stored in this type.
    • scale

      int scale
      Scale must be zero or a positive integer less than or equal to the precision.