On Fri, Nov 20, 2015 at 04:43:29PM -0500, David Lauzon wrote: > > I don't see a Date data type in the spec: > [1]http://avro.apache.org/docs/current/spec.html#schema_primitive > I've seen some old discussions in the ML and issues suggesting to > serialize it using the UNIX epoch in a long value. > However, how do we store events older than 1970 like birthdate ? > > References > > 1. http://avro.apache.org/docs/current/spec.html#schema_primitive
Using ms since UNIX epoch should be fine for dates earlier than 1970 since it gets stored as a signed long. Dates before 1970 will just have a negative value. If you are dealing with dates *really* far in the past (i.e. almost 300 million years ago) you probably need to do something special. -- Evan McClain https://keybase.io/aeroevan
signature.asc
Description: PGP signature
