You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Kalle Niemitalo (Jira)" <ji...@apache.org> on 2022/07/03 15:51:00 UTC

[jira] [Commented] (AVRO-3570) Logical type with "fixed" schema not interoperable

    [ https://issues.apache.org/jira/browse/AVRO-3570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561891#comment-17561891 ] 

Kalle Niemitalo commented on AVRO-3570:
---------------------------------------

I wrote about this in [https://github.com/apache/avro/pull/1630/files#r912499135]

> Logical type with "fixed" schema not interoperable
> --------------------------------------------------
>
>                 Key: AVRO-3570
>                 URL: https://issues.apache.org/jira/browse/AVRO-3570
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: csharp, doc, rust
>    Affects Versions: 1.11.0
>            Reporter: Kalle Niemitalo
>            Priority: Major
>
> The Avro specification does not include examples on how to apply the "decimal" or "duration" logical type to a "fixed" type. The implementations disagree on what the correct JSON structure is.
> The C++, Java, Python, and Ruby libraries expect the properties of the "fixed" type to be in the same JSON object as the properties of the logical type:
> {code:JSON}
> {
>     "type": "fixed",
>     "name": "test.FixedDecimal",
>     "size": 8,
>     "logicalType": "decimal",
>     "precision": 18,
>     "scale": 4
> }
> {code}
> The C# and Rust libraries instead expect a nested JSON object for the "fixed" type:
> {code:JSON}
> {
>     "type": {
>         "type": "fixed",
>         "name": "test.Fixed8",
>         "size": 8
>     },
>     "logicalType": "decimal",
>     "precision": 18,
>     "scale": 4
> }
> {code}
> Schemas using types like this are then not interoperable between languages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)