[
https://issues.apache.org/jira/browse/AVRO-1497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14218139#comment-14218139
]
Ryan Blue commented on AVRO-1497:
---------------------------------
I took a closer look at this last night. It looks like we still need to address
Doug's initial feedback on my original patch that the LogicalType should act as
a utility to access local type information on the Schema, but shouldn't change
the Schema class itself.
I also noticed that this adds serialization and deserialization methods to the
LogicalType. I'd rather handle that in the data model and reader/writer code so
that the logical type doesn't force a particular implementation. A good example
of why we wan this to be flexible is that we expect people to use both Joda
objects and Java 8 date/time objects. Moving this to a follow-on issue would
simplify the patch quite a bit so we could get it in for the next release.
If the LogicalType is just additional JSON properties in the Schema, then we
need to consider schema evolution. Additional properties aren't currently
checked when determining if schemas are compatible, so it's possible to drop or
change a logical type. I think we need to make sure that we don't create
inconsistent objects across files when using the same read schema.
> Add LogicalType support to Java
> -------------------------------
>
> Key: AVRO-1497
> URL: https://issues.apache.org/jira/browse/AVRO-1497
> Project: Avro
> Issue Type: New Feature
> Components: java
> Reporter: Ryan Blue
> Assignee: Zoltan Farkas
> Fix For: 1.7.8
>
>
> AVRO-1402 updates the Avro spec to include logical types, which are stored as
> existing types but interpreted as others. The next step is to implement
> LogicalType (in Java) that provides tools to attach a logical type to a
> schema, read a logical type, and validate logical types.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)