GitHub user rdblue opened a pull request:

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

    AVRO-1684: Add support for date, time, and timestamp to specific

    This is based on AVRO-1672, which adds the date, time, and timestamp 
conversions.
    
    The specific IDL has been updated with 3 new field types: date, time_ms, 
and timestamp_ms. These will translate to fields that use the appropriate 
logical types that were added in AVRO-1672.
    
    The compiler now includes logic to add date, time, and timestamp fields 
using Joda time objects, and the data reader and writer support classes with 
those objects. In addition, there is a test to validate that classes compiled 
from schemas with logical types before this patch still work.
    
    Field conversions have been added to SpecificRecordBase via 
`getConversion(int)` and `getConversion(String fieldName)`.

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

    $ git pull https://github.com/rdblue/avro AVRO-1684-specific-date-time

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

    https://github.com/apache/avro/pull/37.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 #37
    
----
commit 6a046d455bc521bd1da5a5f4ad64d4cb1a75a697
Author: Ryan Blue <b...@apache.org>
Date:   2015-05-28T22:46:44Z

    AVRO-1672: Add time logical types and conversions.
    
    This uses Joda classes to represent the new logical types:
    * date => LocalDate
    * time-millis => LocalTime
    * timestamp-millis => DateTime
    
    Joda is an optional dependency and will only be loaded if the
    conversions in org.apache.avro.data.TimeConversions are referenced. By
    default, no logical type conversions are enabled so there is no
    additional runtime dependency for existing applications.

commit 09b3dbebbf06bd71ccd18039e00d278226e4d2e3
Author: Ryan Blue <b...@apache.org>
Date:   2015-05-28T23:59:40Z

    AVRO-1684: Add time types to the specific compiler.
    
    This adds a dependency on Joda time for both the compiler and the
    compiled classes. When generating Java classes, any conversion that is
    registered with the compiler's SpecificData instance will be used.

commit bead1610648cc7c0cb63a4b19e0d503b31f1e043
Author: Ryan Blue <b...@apache.org>
Date:   2015-06-16T20:08:46Z

    AVRO-1672: Add tests for specific date/time types.

commit 8754a2ba8ed4675b98bb42bf60043acdebb81326
Author: Ryan Blue <b...@apache.org>
Date:   2015-06-17T19:20:48Z

    AVRO-1684: Make specific time support compatible with existing classes.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to