Jordan Sammut created NIFI-14297:
------------------------------------

             Summary: Avro Schemas: No support for String default on bytes with 
'decimal' logicalType
                 Key: NIFI-14297
                 URL: https://issues.apache.org/jira/browse/NIFI-14297
             Project: Apache NiFi
          Issue Type: Bug
          Components: NiFi API
    Affects Versions: 2.2.0
         Environment: Docker with NiFi 2.2.0 Image
            Reporter: Jordan Sammut
             Fix For: 2.3.0
         Attachments: image-2025-02-25-15-59-37-422.png

There is currently no way to utilise and AVRO schema, with a field of type 
'bytes' and logicalType 'decimal', and providing a string for a default value.

*Steps to reproduce:*
 *  Launch a NiFi Environment using Version 2.2.0
 * Create an AVROSchemaRegistry Service
 * Insert a schema, with a field as type 'bytes', logicalType 'decimal' and 
default "0.0000"

Example:


{code:java}
{
  "type": "record",
  "name": "ExampleRecord",
  "fields": [
    {
      "name": "big_decimal_field",
      "type": {
        "type": "bytes",
        "logicalType": "decimal",
        "precision": 10,
        "scale": 4
      },
      "default": "0.0000"
    }
  ]
} {code}

*Result:*

Service enters "Invalid" State

!image-2025-02-25-15-59-37-422.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to