--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/be66cc60-dcf8-46d3-9840-7a20045f5cce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Leon,JDBC's decimal and numeric types are converted to byte array as there is no java type can keep the precision. The scale parameter in 'connnect.parameters' encodes the scale of the decimal type and the byte array value encodes the unscaled part.Basically, you can retrieve the scale from the Avro schema and convert back to original decimal value with the byte array value.In java, you can usenew BigDecimal(new BigInteger(value), scale)to convert back to the original value.Thanks,Liquan
On Sun, Apr 24, 2016 at 7:26 PM, Leon <leel...@huawei.com> wrote:--Hi,MySQL decimal type is converted to avro bytes type. How is the decimal encoded in the byte array? I want to convert the byte array back to original decimal value in JavaScript so I need to know how it is encoded.Following is the avro type I memtioned:{"type":"bytes","connect.version":1,"connect.parameters":{"scale":"0"},"connect.name":"org.apache.kafka.connect.data.Decimal"}Leon
--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/0c787967-a5d0-4ec9-919e-8d439f346f79%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/0c787967-a5d0-4ec9-919e-8d439f346f79%40googlegroups.com.
--Thanks,
Ewen