You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/27 07:37:17 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #33518: [SPARK-34619][SQL][DOCS] Describe ANSI interval types at the `Data types` page of the SQL reference
cloud-fan commented on a change in pull request #33518:
URL: https://github.com/apache/spark/pull/33518#discussion_r677196111
##########
File path: docs/sql-ref-datatypes.md
##########
@@ -49,6 +49,44 @@ Spark SQL and DataFrames support the following data types:
absolute point in time.
- `DateType`: Represents values comprising values of fields year, month and day, without a
time-zone.
+* Interval types
+ - `YearMonthIntervalType(startField, endField)`: Represents a year-month interval which is made up of a contiguous subset of the following fields:
+ - MONTH, months within years `[0..11]`,
+ - YEAR, years in the range `[0..178956970]`.
+
+ Individual interval fields are non-negative, but an interval itself can have a sign, and be negative.
+
+ `startField` is the leftmost field, and `endField` is the rightmost field of the type. Valid values of `startField` and `endField` are 0(MONTH) and 1(YEAR). Supported year-month interval types are:
+
+ |Year-Month Interval Type|Short form|An instance of the type|
Review comment:
do we really need to mention the short form? It seems only available in Scala `YearMonthIntervalType.apply`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org