Re: Avro Logical type

2018-09-04 Thread Indhumathi M
Hi Ryan, Thanks for your reply. If i am creating a byte avro schema of logical type decimal and my data is a json record. For example, val json = {"bytes":"10.2"} and i am using the following converter provided by Avro. [image: image.png] But this returns a bytearray, which is a direct conversion

Re: Avro Logical type

2018-09-04 Thread Ryan Blue
Indhumathi, BigInteger provides the values as a two's-complement big endian byte array when toByteArray is called. It also accepts byte arrays with that format in its constructor. See https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html#toByteArray() The conversion you're looking a

Avro Logical type

2018-09-04 Thread Indhumathi M
Hello all, I am working on avro logical type decimal, but was not sure what data has to be provided. As mentioned in the Avro document, 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-en