Support for Avro logicalType
When an avro encoded message is displayed as JSON, then attributes that have a logicalType are not rendered properly. In my specific case, the attribute's schema looks like this:
...,
{
"name": "someAttr",
"type": {
"type": "bytes",
"logicalType":"decimal",
"precision":8,
"scale":2
}
}
...
In the UI it seems like the byte value is getting converted to a string instead of the value being displayed as a decimal value.
Would it be possible to display the value based on the logicalType instead of the type?
Hey Gabor, I wasn't aware that there's a special meaning of the type attribute for Avro encoded messages. Currently we just try to convert the messages to JSON and use on the open source JSON viewers to view the message. Therefore I'm afraid that this is not easily possible, but we can keep this open in case there will be an option in the future.
Can you post an example please? Screenshot would be helpful too 😄
I'm having a similar issue, this is what it looks like in UI:
The schema I'm using:
{
"type": "bytes",
"scale": 18,
"precision": 100,
"logicalType": "decimal"
}
And just to clarify, this is a part of Avro's spec: https://avro.apache.org/docs/1.11.1/specification/#decimal.
It looks like the latest version of goavro supports logical types, so something is missing in the deserialization logic...
Hey @voidcontext and @sap1ens , could you check whether this is fixed with the latest Console version?
Docker image: vectorized/console-unstable:master-2c6f266
@weeco yep, it works! Thanks 👍