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

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

GitHub user tjwp opened a pull request:

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

    AVRO-1695: Ruby support for logical types revisited

    This is a continuation of the changes originally submitted in 
https://github.com/apache/avro/pull/44 for 
https://issues.apache.org/jira/browse/AVRO-1695.
    
    Original description:
    
        Add Ruby support for logical types
    
        Only logical types that map directly to Ruby standard library types are 
supported:
    
        * date maps to Date;
        * timestamp-millis and timestamp-micros map to Time.
    
        The remaining types are difficult to cleanly map to Ruby types, so I've 
refrained from doing so.   
        Furthermore, there's no direct support for plugging in custom mappers – 
I'm unsure if this is     
        needed.
    
    I've tried to add address the feedback from the original PR, primarily 
pushing some of the implementation into `Avro::Schema.real_parse` and ensuring 
that the Ruby tests cover all the same cases as the Java conversion tests.
    
    One change I've made here is to have `Avro::Schema#logical_type` return the 
name of the logical type.
    
    For now I've preserved the original changes as a separate commit, but I can 
rebase the changes if this gets accepted.
    
    CC @dasch

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

    $ git pull https://github.com/salsify/avro tjwp/ruby-logical-types

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

    https://github.com/apache/avro/pull/116.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 #116
    
----
commit cde8338f652b9a5f0864fb2d7c679720f9c71efd
Author: Daniel Schierbeck <[email protected]>
Date:   2016-08-23T14:48:59Z

    Add Ruby support for logical types
    
    Only logical types that map directly to Ruby standard library types are
    supported:
    
    * `date` maps to Date;
    * `timestamp-millis` and `timestamp-micros` map to Time.

commit f1a616857b8c9eeca04335ed851ee8831234bc1c
Author: Tim Perkins <[email protected]>
Date:   2016-08-23T16:50:33Z

    PR Feedback
    
    * Move logical_type determination into `.real_parse`.
    * `#logical_type` now returns the logical type name.
    * Change logical type "adapters" to modules since there will be no 
instances.
    * Parity with Java conversion tests.

----


> Add LogicalType support to the Ruby library
> -------------------------------------------
>
>                 Key: AVRO-1695
>                 URL: https://issues.apache.org/jira/browse/AVRO-1695
>             Project: Avro
>          Issue Type: New Feature
>          Components: ruby
>            Reporter: Daniel Schierbeck
>
> It would be nice if the Ruby library had feature parity. I would be willing 
> to contribute work if someone could review and merge the code.



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

Reply via email to