aboutsummaryrefslogtreecommitdiff
path: root/docs/sql-programming-guide.md
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 14:04:07 -0800
commit5edbcbfb61703398a24ce5162a74aba04e365b0c (patch)
treedd311f026dae6b23a4b560368e1564faaff5ec83 /docs/sql-programming-guide.md
parent7b79957879db4dfcc7c3601cb40ac4fd576259a5 (diff)
downloadspark-5edbcbfb61703398a24ce5162a74aba04e365b0c.tar.gz
spark-5edbcbfb61703398a24ce5162a74aba04e365b0c.tar.bz2
spark-5edbcbfb61703398a24ce5162a74aba04e365b0c.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
Diffstat (limited to 'docs/sql-programming-guide.md')
-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>