avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Feature for Date/Time Data Types in Avro?
Date Tue, 18 Jan 2011 17:30:59 GMT
On 01/18/2011 09:19 AM, Jeremy Custenborder wrote:
> I agree with storing it as a long. How would you handle this in code
> generation and serialization? Would you envision hooks during code
> generation that would generate a member that is the native date time
> for the language?

Yes.  Just as "bytes" is represented in Java by java.nio.ByteBuffer, 
"org.apache.avro.lib.Date" could be represented by java.util.Date.

> Does the serializer handle a date object that is
> native to the language?

Yes, serializers and deserializers would need to implement this mapping.

Does this sound like a reasonable approach?

> I really like the idea of having a standard
> datetime as a supported type of avro. It's a problem that everyone has
> to solve on their own.

Care to file a Jira issue?  I won't have time to work on it for at least 
a few weeks, but someone else could, or I can work on it later.

Doug

Mime
View raw message