[
https://issues.apache.org/jira/browse/AVRO-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786110#action_12786110
]
Philip Zeyliger commented on AVRO-249:
--------------------------------------
It wouldn't surprise me if Avro evolved to have int8, int16, int32, int64 and
fixed8, fixed,16, fixed32, fixed64 "types" (all implemented using varint and
fixed, but with the APIs responsible for bounds checking) eventually. But
that's neither here nor there.
Not sure what you mean by mix-ins, but, yes, you could annotate the field in
the class whose schema is being induced.
I understand the expedience of modelling shorts this way. I worry that it will
make the reflection API harder to evolve. It's saying that from now on, all
Java shorts shall be 2-byte fixeds, and that's going to be the default forever
more.
I haven't thought about the evolution required of the reflect API. Is it
possible to change, later, how the same Java class is serialized?
> in reflection, represent Java short as fixed data
> -------------------------------------------------
>
> Key: AVRO-249
> URL: https://issues.apache.org/jira/browse/AVRO-249
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.3.0
>
> Attachments: AVRO-249.patch
>
>
> Currently the Java reflect API treats shorts as ints. This fails however to
> naturally handle shorts in arrays and other containers. It would be better
> if we used a distinct type for reflected Java short values.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.