avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Blue <rb...@netflix.com.INVALID>
Subject Re: TimestampConversion.getRecommendedSchema() question
Date Thu, 10 Nov 2016 20:52:04 GMT
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