You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Raj G (Jira)" <ji...@apache.org> on 2020/11/02 20:24:00 UTC
[jira] [Updated] (AVRO-2953) Issue with deserialization when a
schema composition of another object as an optional field
[ https://issues.apache.org/jira/browse/AVRO-2953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raj G updated AVRO-2953:
------------------------
Affects Version/s: 1.9.1
Description:
I'm trying to use a avro contract to publish a message onto Kafka using a c# producer and trying to consume it using a java consumer. This is working for most of the data type except the below contract "OptionalComposition".
{
"type": "record",
"name": "OptionalComposition",
"doc": "Contract to test composition with optional field ",
"namespace": "com.abc.avro.contracts",
"fields": [
{
"name": "partOf",
"type": ["null", "com.abc.avro.contracts.Reference"],
"default": null
}
]
}
{
"type": "record",
"name": "Reference",
"namespace": "com.abc.avro.contracts",
"fields": [
{
"name": "identifier",
"type": "string"
},
{
"name": "name",
"type": "string"
}
]
}
> Issue with deserialization when a schema composition of another object as an optional field
> --------------------------------------------------------------------------------------------
>
> Key: AVRO-2953
> URL: https://issues.apache.org/jira/browse/AVRO-2953
> Project: Apache Avro
> Issue Type: Bug
> Affects Versions: 1.9.1
> Reporter: Raj G
> Priority: Major
>
> I'm trying to use a avro contract to publish a message onto Kafka using a c# producer and trying to consume it using a java consumer. This is working for most of the data type except the below contract "OptionalComposition".
>
> {
> "type": "record",
> "name": "OptionalComposition",
> "doc": "Contract to test composition with optional field ",
> "namespace": "com.abc.avro.contracts",
> "fields": [
> {
> "name": "partOf",
> "type": ["null", "com.abc.avro.contracts.Reference"],
> "default": null
> }
> ]
> }
> {
> "type": "record",
> "name": "Reference",
> "namespace": "com.abc.avro.contracts",
> "fields": [
> {
> "name": "identifier",
> "type": "string"
> },
> {
> "name": "name",
> "type": "string"
> }
> ]
> }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)