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/01/28 11:58:00 UTC

[jira] [Comment Edited] (AVRO-2299) Get Plain Schema

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

Rumeshkrishnan edited comment on AVRO-2299 at 1/28/19 11:57 AM:
----------------------------------------------------------------

Hi [~cutting], as per my understanding, normalising the schema should result same for before and after full compatibility check. But problem is `default` is not consider as reserved key. Can I modify  SchemaNormalization class with required changes and create the patch ? Kindly give your input, am I correct.


was (Author: rumeshkrish):
Hi [~cutting], as per my understanding, normalise the schema should result same before and after full compatibility check. But here, `default` tag missing causing the problem. Can I modify  SchemaNormalization class with required changes and create the patch ? Kindly give your input, am I correct.

> Get Plain Schema
> ----------------
>
>                 Key: AVRO-2299
>                 URL: https://issues.apache.org/jira/browse/AVRO-2299
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.8.2
>            Reporter: Rumeshkrishnan
>            Priority: Critical
>              Labels: features
>             Fix For: 1.9.0, 1.8.2, 1.8.3, 1.8.4
>
>
> {panel:title=Avro Schema Reserved Keys:}
> "doc", "fields", "items", "name", "namespace",
>  "size", "symbols", "values", "type", "aliases", "default"
> {panel}
> AVRO also supports user defined properties for both Schema and Field.
> Is there way to get the schema with reserved property (key, value)? 
> Input Schema: 
> {code:java}
> {
>   "name": "testSchema",
>   "namespace": "com.avro",
>   "type": "record",
>   "fields": [
>     {
>       "name": "email",
>       "type": "string",
>       "doc": "email id",
>       "user_field_prop": "xxxxx"
>     }
>   ],
>   "user_schema_prop": "xxxxxx"
> }{code}
> Expected Plain Schema:
> {code:java}
> {
>   "name": "testSchema",
>   "namespace": "com.avro",
>   "type": "record",
>   "fields": [
>     {
>       "name": "email",
>       "type": "string",
>       "doc": "email id"
>     }
>   ]
> }
> {code}



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