Gordon-F commented on PR #2299:
URL: https://github.com/apache/avro/pull/2299#issuecomment-2270062189

   > I think I can move decimals to bigdecimal usage - indeed, that would be an 
easy task, as they are bigint internally. So it's almost like drop-in 
replacement. 
   
   @ftelnov @martin-g Is it still planned?
   
   It's not an easy task to work with floating point decimal values with 
current API. Even in the readme examples, there is only an example of working 
with integer values. And there is no way to represent value (for reader/writer) 
with a schema like this (please, correct me if I'm wrong):
   ```json
   {
     "name": "decimal",
     "type": "bytes",
     "logicalType": "decimal",
     "scale": 8,
     "precision": 28
   }
   ```
   
   All of this can be fixed with an internal representation of `Value::Decimal` 
as `bigdecimal::BigDecimal`. If there is a performance issue, I think it can be 
fixed by compile-time feature (decimal_as_bigdecimal?).
   
   If these changes are ok, I can work on this and send a PR.


-- 
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