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

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

GitHub user timmsc opened a pull request:

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

    AVRO-1957

    TimeConversions do not implement getRecommendedSchema()

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

    $ git pull https://github.com/timmsc/avro 
AVRO-1957-TimeConversions-getRecommendedSchema

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

    https://github.com/apache/avro/pull/154.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 #154
    
----
commit b063685628b2373f489e42c9ec85e96ee5ed0073
Author: Sean Timm <[email protected]>
Date:   2016-11-10T22:07:39Z

    AVRO-1957
    TimeConversions do not implement getRecommendedSchema()

----


> TimeConversions do not implement getRecommendedSchema()
> -------------------------------------------------------
>
>                 Key: AVRO-1957
>                 URL: https://issues.apache.org/jira/browse/AVRO-1957
>             Project: Avro
>          Issue Type: Bug
>    Affects Versions: 1.8.1
>            Reporter: Sean Timm
>
> org.apache.avro.data.TimeConversions.TimestampConversion and other date and 
> time conversions do not implement getRecommendedSchema(). When trying to 
> dynamically generate an Avro schema from a pojo that contains a DateTime 
> object using ReflectData, I get an unsupported operation exception.
> I think the implementation should be as simple as
> {code}
> @Override
> public Schema getRecommendedSchema() {
>       return 
> LogicalTypes.timestampMillis().addToSchema(Schema.create(Schema.Type.LONG));
> }
> {code}



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

Reply via email to