You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2020/06/07 03:43:57 UTC

[GitHub] [avro] ziggythehamster commented on pull request #840: [AVRO-2677] Added decimal encoding and decoding logic

ziggythehamster commented on pull request #840:
URL: https://github.com/apache/avro/pull/840#issuecomment-640152406


   > I believe that the encoded representation of the decimal should be the unscaled value, not a string representation.
   
   Even worse, you have to produce a special sequence of bytes (which in Ruby is a string, but don't let that fool you into thinking `"1.234"` is correct). It must conform to this specification:
   
   > A decimal logical type annotates Avro bytes or fixed types. The byte array must contain the two's-complement representation of the unscaled integer value in big-endian byte order. The scale is fixed, and is specified using an attribute.
   
   https://avro.apache.org/docs/current/spec.html#Decimal
   
   (copied from the other ticket)


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org