exceptionfactory commented on PR #9755:
URL: https://github.com/apache/nifi/pull/9755#issuecomment-2699482446

   > @exceptionfactory If you do not mind can you please explain why your 
changes were necessary? I am trying to wrap my head around this but I am not 
understanding. Thanks!
   
   Thanks for asking! The additional case handling for a `byte[]` in 
`DataTypeUtils` was necessary to handle support for a default string value 
using the byte array type for the field. When reading the record, the Avro 
Schema returns the default value as a byte array. In order to treat it as the 
`BigDecimal` logical type, the conversion from a byte array to a BigDecimal is 
required.
   
   If you remove the case statement in `DataTypeUtils`, you can see how the 
unit test fails when attempting to handle the default value.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to