Reynold Xin created SPARK-8753:
----------------------------------

             Summary: Create an IntervalType data type
                 Key: SPARK-8753
                 URL: https://issues.apache.org/jira/browse/SPARK-8753
             Project: Spark
          Issue Type: New Feature
          Components: SQL
            Reporter: Reynold Xin


We should create an IntervalType data type that represents time intervals. 
Internally, we can use a long value to store it, similar to Timestamp (i.e. 
100ns precision). This data type initially cannot be stored externally, but 
only used for expressions.

1. Add IntervalType data type.

2. Add parser support in our SQL expression, in the form of

{code}
INTERVAL [number] [unit] 
{code}

unit can be YEAR[S], MONTH[S], WEEK[S], DAY[S], HOUR[S], MINUTE[S], SECOND[S], 
MILLISECOND[S], MICROSECOND[S], or NANOSECOND[S].

3. Add in the analyzer to make sure we throw some exception to prevent saving a 
dataframe/table with IntervalType out to external systems.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to