You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Rumeshkrishnan (JIRA)" <ji...@apache.org> on 2019/03/01 08:56:00 UTC

[jira] [Created] (AVRO-2330) Hybrid Schema

Rumeshkrishnan created AVRO-2330:
------------------------------------

             Summary: Hybrid Schema
                 Key: AVRO-2330
                 URL: https://issues.apache.org/jira/browse/AVRO-2330
             Project: Apache Avro
          Issue Type: New Feature
            Reporter: Rumeshkrishnan


How to useĀ resolving decoder to get the data for below writer and reader schema ?

Writer Avro Schema:
{code:java}
{
     "type" : "record",
     "name" : "Employee",
     "fields" : [
        { "name" : "name" , "type" : "string" },
        { "name" : "id", "type": "int"},
        { "name" : "salary", "type": "int"},
        { "name" : "age", "type": "int"},
        { "name" : "address", "type": {
            "type" : "record",
            "name" : "Address",
            "fields" : [
                {  "name": "lines" , "type" : {
                   "type": "record",
                   "name": "Lines",
                   "fields" : [
                     { "name": "line1", "type": "string"},
                     { "name": "line2", "type": "string"}
                   ]
                }},
                { "name": "city", "type": "string"},
                { "name": "country", "type": "string"}
             ]
        }}
     ]
}{code}
Reader Avro Schema:
{code:java}
{
     "type" : "record",
     "name" : "EmployeeAbstract",
     "fields" : [
        { "name" : "name" , "type" : "string" },
        { "name" : "age", "type": "int"},
        { "name" : "city", "type": "string"}
     ]
}{code}
Is it possible ?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)