You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Adam Batkin (JIRA)" <ji...@apache.org> on 2017/11/22 05:12:00 UTC

[jira] [Commented] (AVRO-2079) Add ability to use Java 8 date/time types instead of Joda time.

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

Adam Batkin commented on AVRO-2079:
-----------------------------------

This isn't a "me too" but I think that this work should be considered a high-priority, and here's why: Currently, if you use any logical types, all (Specific) generated classes will contain ALL of the built-in conversions, which include DATE_CONVERSION, TIME_CONVERSION and TIMESTAMP_CONVERSION. This means you MUST include JodaTime on your classpath or you will fail with a ClassNotFoundException (org.jora.time.ReadablePartial).

Users of the Decimal logical type are out of luck, unless they want to include Joda Time.

I can open a separate Jira, but that isn't needed, if we will see this work in the next release. Plus, any fix would likely conflict with this issue, and I'd rather not cause confusion if that isn't necessary.

> Add ability to use Java 8 date/time types instead of Joda time.
> ---------------------------------------------------------------
>
>                 Key: AVRO-2079
>                 URL: https://issues.apache.org/jira/browse/AVRO-2079
>             Project: Avro
>          Issue Type: Improvement
>          Components: java, logical types
>    Affects Versions: 1.8.2
>            Reporter: Auke van Leeuwen
>              Labels: patch-available
>
> Currently, for the date/time related logical types, we are generating Joda date/time objects. Since we've moved to Java-8 (AVRO-2043) it seems logical to also provide the possibility to generate {{java.time.*}} date/time objects instead of the Joda time variants.
> I propose to make this is a switch in {{SpecificCompiler.java}} which will default to Joda (I think), but can be set to generate the Java 8 versions.
> (I'm currently trying to run through the code to see if I can make it work.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)