[ 
https://issues.apache.org/jira/browse/DRILL-356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mehant Baid updated DRILL-356:
------------------------------

    Attachment:     (was: DRILL-356.patch)

> Implement support for Date type
> -------------------------------
>
>                 Key: DRILL-356
>                 URL: https://issues.apache.org/jira/browse/DRILL-356
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Mehant Baid
>            Assignee: Mehant Baid
>
> Add logic to support the following types in Drill: 
> Date - Stores date alone (timezoneless)
> TimeStamp - Stores date and time (timezoneless)
> Time - Stores time only (timezoneless)
> TimeStampTZ - Stores date and time, contains timezone information
> Interval - Used to store an interval of time, following are the parameters 
> which can combine to form an interval type (year, months, days, hours, 
> minutes, seconds, milliseconds)
> IntervalYear - Used to store an interval of time in years, months
> IntervalDay - Stores an interval of time in days to seconds i.e: days, hours, 
> minutes, seconds, milliseconds
> Internally Date, TimeStamp use a long field to store milliseconds. It 
> represents time since epoch in UTC. 
> Since TimeStamp has a timezone associated with it, it additionally uses an 
> int field to store the timezone index. We maintain a static list of all 
> existing timezones and the int field within TimeStamp represents an index 
> into this list. 
> Time uses an integer field to store a given time of day 
> Interval type is used to represent a period of time. It has one or more of 
> the following fields: Year, month, day, hour, minute, second, millisecond. 
> Internally we convert and store only three fields: months, days, 
> milliseconds. There is a one to one mapping available between all possible 
> fields and our internal fields. Eg: Year to month is (1 Year = 12 months) and 
> so on. 
> IntervalYear (Year, Month) and IntervalDay (Day, Hours, Minutes, Seconds, 
> Millis) are a simpler version of Interval with a subset of the fields. 
> We use Joda libraries underneath when we want to perform date arithmetic, 
> time zone conversion etc. Although for comparison functions we don't use Joda 
> because our internal representation (of milliseconds) is sufficient enough 
> for all comparisons.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to