avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Timm <sean.t...@teamaol.com>
Subject Re: TimestampConversion.getRecommendedSchema() question
Date Thu, 10 Nov 2016 20:55:24 GMT
Will do. Thanks!

On Thu, Nov 10, 2016 at 3:52 PM, Ryan Blue <rblue@netflix.com.invalid>
wrote:

> Looks like an oversight to me. It would be great if you want to send a PR
> to fix it. Could you also add one to the date and time conversions? It
> looks like those are missing as well. Thanks!
>
> On Thu, Nov 10, 2016 at 12:45 PM, Sean Timm <sean.timm@teamaol.com> wrote:
>
> > org.apache.avro.data.TimeConversions.TimestampConversion does not
> > implement getRecommendedSchema(). Is this intentional? 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
> >
> > @Override
> > public Schema getRecommendedSchema() {
> >       return
> > LogicalTypes.timestampMillis().addToSchema(Schema.create(
> > Schema.Type.LONG));
> > }
> >
> > If folks agree, I can create a Jira and pull request.
> >
> > Thanks,
> > Sean
> >
>
>
>
> --
> Ryan Blue
> Software Engineer
> Netflix
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message