GitHub user cloud-fan opened a pull request:

    https://github.com/apache/spark/pull/7226

    [SPARK-8753][SQL][WIP] Create an IntervalType data type

    We need a new data type to represent time intervals. Because we can't 
determine how many days in a month, so we need year-month interval type and 
day-time interval type, like hive did.
    
    However, we need a further discussion to decide the detail of interval type 
syntax. Hive support `interval '30-0' year to month` and `interval '3 0:0:0' 
day to second`. Oracle has a detail definition of [interval 
syntax](http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements003.htm#i38598),
 which is very similar to hive's.
    
    Because we use number of 100ns as value of `TimestampType`, so it may not 
makes sense to support nano second unit.
    
    TODO:
    * complete the syntax of interval literal.
    * improve doc and test.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloud-fan/spark interval

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/7226.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 #7226
    
----
commit 0502af91d15d6d52d95aeaeef8178d549a9b19df
Author: Wenchen Fan <[email protected]>
Date:   2015-07-05T05:50:31Z

    support interval type

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to