[
https://issues.apache.org/jira/browse/AVRO-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986729#action_12986729
]
Ron Bodkin commented on AVRO-739:
---------------------------------
>From the discussion on the users list, I agree that it'd be great to start
>with a simple timestamp, which gets serialized as a long. Let's start with a
>simple feature, and future enhancements can be tracked separately.
Doug proposed this design:
I noted that it would be nice to allow some flexibility in the implementation
classes for dates, e.g., letting Java users use Joda time classes as well
as java.util.Date
Scott said:
Absolutely. This is a per-language feature though, so it may not require
much of the spec. For example, in Java it could simply be a configuration
parameter passed to the DatumReader/Writers. It doesn't make a lot of
sense to store metadata on the data that says "this is a Joda object, not
java.util.Date" -- that is a user choice and not intrinsic to describing
the data.
My input:
I agree this shouldn't be part of the serialized format. It would be nice to
have a clean way to specify the configuration/mappings used that allows
for specifying the mappings for more such org.apache.avro data types. It
also should be supported for reflection and code generation approaches, as well.
Scott also said:
There are other questions too -- what are the timestamp units
(milliseconds? configurable?), what is the origin (1970? 2010?
configurable?) -- these decisions affect the serialization size.
My input:
I would like to see a format that allows storing data at the precision of
popular libraries and languages (java.util.Date, Joda time, Python datetime,
etc.). Having a long representing microseconds since Jan. 1 1970 seems like a
good compromise for general purpose use. It supports higher precision libraries
and still allows representing a few hundred thousand years of data. Some
libraries do allow nanosecond resolution - but limiting to 270 years seems like
a bigger limitation than microsecond precision.
> Add Date/Time data types
> ------------------------
>
> Key: AVRO-739
> URL: https://issues.apache.org/jira/browse/AVRO-739
> Project: Avro
> Issue Type: New Feature
> Components: spec
> Reporter: Jeff Hammerbacher
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.