aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaoyuan Wang <daoyuan.wang@intel.com>2014-12-01 14:03:57 -0800
committerMichael Armbrust <michael@databricks.com>2014-12-01 15:06:02 -0800
commite66f8166334026cd5506a9b05ab52b73a96fd7f3 (patch)
treea352fb68c2253dbe06c08939e6d24189a7a71f01 /docs
parent31cf51bfaa0e332b903cb5d7f511dfa76d36bdc5 (diff)
downloadspark-e66f8166334026cd5506a9b05ab52b73a96fd7f3.tar.gz
spark-e66f8166334026cd5506a9b05ab52b73a96fd7f3.tar.bz2
spark-e66f8166334026cd5506a9b05ab52b73a96fd7f3.zip
[SQL][DOC] Date type in SQL programming guide
Author: Daoyuan Wang <daoyuan.wang@intel.com> Closes #3535 from adrian-wang/datedoc and squashes the following commits: 18ff1ed [Daoyuan Wang] [DOC] Date type (cherry picked from commit 5edbcbfb61703398a24ce5162a74aba04e365b0c) Signed-off-by: Michael Armbrust <michael@databricks.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/sql-programming-guide.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index c38ca55653..85d446b9da 100644
--- a/docs/sql-programming-guide.md
+++ b/docs/sql-programming-guide.md
@@ -1057,6 +1057,7 @@ Spark SQL supports the vast majority of Hive features, such as:
* `STRING`
* `BINARY`
* `TIMESTAMP`
+ * `DATE`
* `ARRAY<>`
* `MAP<>`
* `STRUCT<>`
@@ -1157,6 +1158,7 @@ evaluated by the SQL execution engine. A full list of the functions supported c
* Datetime type
- `TimestampType`: Represents values comprising values of fields year, month, day,
hour, minute, and second.
+ - `DateType`: Represents values comprising values of fields year, month, day.
* Complex types
- `ArrayType(elementType, containsNull)`: Represents values comprising a sequence of
elements with the type of `elementType`. `containsNull` is used to indicate if
@@ -1265,6 +1267,13 @@ import org.apache.spark.sql._
</td>
</tr>
<tr>
+ <td> <b>DateType</b> </td>
+ <td> java.sql.Date </td>
+ <td>
+ DateType
+ </td>
+</tr>
+<tr>
<td> <b>ArrayType</b> </td>
<td> scala.collection.Seq </td>
<td>
@@ -1391,6 +1400,13 @@ please use factory methods provided in
</td>
</tr>
<tr>
+ <td> <b>DateType</b> </td>
+ <td> java.sql.Date </td>
+ <td>
+ DataType.DateType
+ </td>
+</tr>
+<tr>
<td> <b>ArrayType</b> </td>
<td> java.util.List </td>
<td>
@@ -1538,6 +1554,13 @@ from pyspark.sql import *
</td>
</tr>
<tr>
+ <td> <b>DateType</b> </td>
+ <td> datetime.date </td>
+ <td>
+ DateType()
+ </td>
+</tr>
+<tr>
<td> <b>ArrayType</b> </td>
<td> list, tuple, or array </td>
<td>