You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/03/28 13:19:16 UTC
[jira] [Commented] (DRILL-356) Implement support for Date type
[ https://issues.apache.org/jira/browse/DRILL-356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13950622#comment-13950622 ]
ASF GitHub Bot commented on DRILL-356:
--------------------------------------
GitHub user mehant opened a pull request:
https://github.com/apache/incubator-drill/pull/39
Changes to support date type
DRILL-356
Changes to support Date type
Addressed initial review comments by Jacques
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mehant/incubator-drill DRILL-356
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-drill/pull/39.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #39
----
commit 06014f05d09d77bb1568e6dfe56888406e36e00f
Author: Mehant Baid <me...@gmail.com>
Date: 2014-03-09T00:53:41Z
Changes to support date type
Rebased on latest master (03/27)
Change tests, cast function rules to work with latest master
Change date type names.
TimeStamp -> TimeStampTZ
DateTime -> TimeStamp
Use 4 bytes for millisecond field in Interval, Interval_Day.
Split the templates into multiple files for readability
Add unit test for sorting on date
Remove generating functions for Nullable type, instead use output type handling NullIfNull
Use Joda's string parsing to convert from VarChar to date types instead of our implementation
Remove debug logs and cleanup
----
> 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
> Attachments: DRILL-356_1.patch
>
>
> Add logic to support the following types in Drill:
> Date - Stores date alone (timezoneless)
> DateTime - Stores date and time (timezoneless)
> Time - Stores time only (timezoneless)
> TimeStamp - 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, DateTime 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 use 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 out internal fields. Eg: Year to month is (1 Year = 12 months) and so on. IntervalYear and IntervalDay 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)