[
https://issues.apache.org/jira/browse/AVRO-3430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17500636#comment-17500636
]
Martin Tzvetanov Grigorov commented on AVRO-3430:
-------------------------------------------------
I agree that the name of the attribute ("name") is confusing there!
But it is just an metadata like any other, so I think it is OK to preserve it.
> [Spec] Clarify whether a primitive type can have metadata
> ---------------------------------------------------------
>
> Key: AVRO-3430
> URL: https://issues.apache.org/jira/browse/AVRO-3430
> Project: Apache Avro
> Issue Type: Improvement
> Reporter: Ryan Skraba
> Priority: Major
>
> Given the following schema:
> {code:java}
> {
> "name": "a",
> "namespace": "top",
> "type": "record",
> "fields": [
> {"name": "b", "type": {"name": "c", "type": "string"}}
> ]
> } {code}
> What does the *{{"name": "c"}}* do and how should it be treated?
> Currently, the Java SDK drops this name silently, since primitive types have
> no attributes.
> The spec says:
> {quote}"Attributes not defined in this document are permitted as metadata,
> but must not affect the format of serialized data."
> {quote}
> Should this property be retained in the schema? Is it correct to drop it?
> Should this be a parsing error?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)