[
https://issues.apache.org/jira/browse/AVRO-2299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16755481#comment-16755481
]
Rumeshkrishnan edited comment on AVRO-2299 at 1/30/19 8:29 AM:
---------------------------------------------------------------
If we are suppose to allow user to get the schema normalizer reserved fields
additionally "default", " aliases", "doc" and "logicalType" fields, then we can
name `toCompactForm(Schema schema)` like that ?
Another scenario from user point of view, I am using Avro Schema in our system
to maintain the DB structure. I have defined the mandatory property
`"isFilter": true/false` in field level. So user can also define their own
reserved props in addition to avro reserved props. we can define one more
function `toCompactForm(Schema schema, reserve String[])`
Kindly let me know, your thoughts.
was (Author: rumeshkrish):
If we are suppose to allow user to get the schema normalizer reserved fields
additionally "default", " aliases", "doc" and "logicalType" fields, then we can
name `toCompactForm(Schema schema)` like that ?
Another scenario from user point of view, I am using Avro Schema in our system
to maintain the DB structure. I have defined the mandatory property
`"isFilter": true/false` in field level. So user can also define their own
reserved props in addition to avro reserved props. we can define one more
function `toCanonicalForm(Schema schema, reserve String[])`
Kindly let me know, your thoughts.
> Get Plain Schema
> ----------------
>
> Key: AVRO-2299
> URL: https://issues.apache.org/jira/browse/AVRO-2299
> Project: Apache Avro
> Issue Type: New Feature
> Components: java
> Affects Versions: 1.8.2
> Reporter: Rumeshkrishnan
> Priority: Minor
> 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)