avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1692) Allow more than one logical type for a Java class
Date Mon, 06 Jul 2015 18:02:05 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14615409#comment-14615409
] 

ASF GitHub Bot commented on AVRO-1692:
--------------------------------------

GitHub user rdblue opened a pull request:

    https://github.com/apache/avro/pull/39

    AVRO-1692: Allow multiple logical types for a Java class.

    This changes the class to conversion lookup to store multiple
    conversions and choose based on the logical type name. This still
    assumes that only one conversion is registered for each logical type.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rdblue/avro AVRO-1692-logical-type-fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/avro/pull/39.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #39
    
----
commit a0ed5925274a75654b0003150d3db69c33b13a0d
Author: Ryan Blue <blue@apache.org>
Date:   2015-07-06T17:57:01Z

    AVRO-1692: Allow multiple logical types for a Java class.
    
    This changes the class to conversion lookup to store multiple
    conversions and choose based on the logical type name. This still
    assumes that only one conversion is registered for each logical type.

----


> Allow more than one logical type for a Java class
> -------------------------------------------------
>
>                 Key: AVRO-1692
>                 URL: https://issues.apache.org/jira/browse/AVRO-1692
>             Project: Avro
>          Issue Type: Task
>          Components: java
>            Reporter: Ryan Blue
>            Assignee: Ryan Blue
>             Fix For: 1.8.0
>
>
> The initial logical types implementation assumed that there would only be one logical
type per concrete class and kept a lookup table from class to conversion. There are cases
where this assumption doesn't work. For example, both time-millis and time-micros can be represented
by the same class, LocalTime, and the write path should use the correct logical type's conversion
depending on the schema.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message