You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/05/04 12:08: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=16463788#comment-16463788 ] 

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

pvorb opened a new pull request #309: AVRO-2079: Add ability to generate Java8 native date/time classes (new)
URL: https://github.com/apache/avro/pull/309
 
 
   As there was no progress on #248 for the past few months, I went ahead and resolved the merge conflicts of that PR and also fixed the remarks from @Kuroshii.
   
   Here's a brief overview of what I've changed:
   
   - Reorder imports in TestJava8TimeConversions.java
   - Directly cast epochDays to int
   - Directly cast millis to int
   - Explicitly format java8 and joda time dates in test
   - Rename DateTimeLogicalTypeType to DateTimeLogicalTypeImplementation
   - Refactor registration of conversions
   - Make DateTimeLigicalTypeImplementation field final
   - Use parent POM version in Maven plugin tests
   - Log warning message about unknown parameter values
   - Remove unused imports
   
   I would also suggest to rename the enum value `JAVA8` and all of its uses to `JSR310` because that's more specific to the `java.time.*` APIs introduced in Java 8 (see https://jcp.org/en/jsr/detail?id=310). I can add that change if you agree.
   
   @Kuroshii I would appreciate if you could review this PR again, so maybe we'll have JSR-310 support in the next Avro release. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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
>            Priority: Major
>              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
(v7.6.3#76005)