You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Alexey Raga (Jira)" <ji...@apache.org> on 2022/07/07 10:54:00 UTC
[jira] [Commented] (AVRO-1556) csharp PrimitiveSchema loses custom properties in WriteJson/ToString
[ https://issues.apache.org/jira/browse/AVRO-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563705#comment-17563705 ]
Alexey Raga commented on AVRO-1556:
-----------------------------------
Can this be reviewed?
> csharp PrimitiveSchema loses custom properties in WriteJson/ToString
> --------------------------------------------------------------------
>
> Key: AVRO-1556
> URL: https://issues.apache.org/jira/browse/AVRO-1556
> Project: Apache Avro
> Issue Type: Bug
> Components: csharp
> Affects Versions: 1.7.7
> Reporter: Dmitry Kovalev
> Assignee: Dmitry Kovalev
> Priority: Major
> Fix For: 1.9.0
>
> Attachments: AVRO-1556-csharp-primitiveschema-fix.patch
>
>
> PrimitiveSchema class overrides WriteJson method to handle a shotrcut where primitive type is given as a literal, but in doing so it ignores teh case where there are custom properties attached to it.
> This breaks any functionality which relies on the equality of the schema re-parsed from its ToString/WriteJson output, one example being csharp codegen.
> Example:
> { "type": "string", "logicalType":"DateTimeInstant", "logicalEncoding":"ISO8601-datetime-offset" }
> becomes "type" : "string"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)