[
https://issues.apache.org/jira/browse/AVRO-870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079688#comment-13079688
]
Scott Carey commented on AVRO-870:
----------------------------------
We should be able to add a constructor that takes (Schema.Type, Props) for
primitives, disallow addProp() for primitive Schemas.
We will have to change Schema.parse() and a few other things as well. However,
all such changes would be required for a truly immutable Schema implementation
anyway, and I would like to evolve in that direction.
> Use singleton class instances for primitive Schemas
> ---------------------------------------------------
>
> Key: AVRO-870
> URL: https://issues.apache.org/jira/browse/AVRO-870
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.5.1
> Reporter: Aaron Kimball
>
> Would make a solid performance improvement for operations like
> Schema.equals() if the {{Schema.create(Schema.Type.INT)}} operation (and
> STRING, LONG, and other primitive types) returned referentially--equal
> objects every time.
> This would require disallowing calls to {{addProp()}}, or else something
> clever.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira