Skip to content

Commit 5edbcbf

Browse files
adrian-wangmarmbrus
authored andcommitted
[SQL][DOC] Date type in SQL programming guide
Author: Daoyuan Wang <[email protected]> Closes #3535 from adrian-wang/datedoc and squashes the following commits: 18ff1ed [Daoyuan Wang] [DOC] Date type
1 parent 7b79957 commit 5edbcbf

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/sql-programming-guide.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,7 @@ Spark SQL supports the vast majority of Hive features, such as:
10571057
* `STRING`
10581058
* `BINARY`
10591059
* `TIMESTAMP`
1060+
* `DATE`
10601061
* `ARRAY<>`
10611062
* `MAP<>`
10621063
* `STRUCT<>`
@@ -1157,6 +1158,7 @@ evaluated by the SQL execution engine. A full list of the functions supported c
11571158
* Datetime type
11581159
- `TimestampType`: Represents values comprising values of fields year, month, day,
11591160
hour, minute, and second.
1161+
- `DateType`: Represents values comprising values of fields year, month, day.
11601162
* Complex types
11611163
- `ArrayType(elementType, containsNull)`: Represents values comprising a sequence of
11621164
elements with the type of `elementType`. `containsNull` is used to indicate if
@@ -1264,6 +1266,13 @@ import org.apache.spark.sql._
12641266
TimestampType
12651267
</td>
12661268
</tr>
1269+
<tr>
1270+
<td> <b>DateType</b> </td>
1271+
<td> java.sql.Date </td>
1272+
<td>
1273+
DateType
1274+
</td>
1275+
</tr>
12671276
<tr>
12681277
<td> <b>ArrayType</b> </td>
12691278
<td> scala.collection.Seq </td>
@@ -1390,6 +1399,13 @@ please use factory methods provided in
13901399
DataType.TimestampType
13911400
</td>
13921401
</tr>
1402+
<tr>
1403+
<td> <b>DateType</b> </td>
1404+
<td> java.sql.Date </td>
1405+
<td>
1406+
DataType.DateType
1407+
</td>
1408+
</tr>
13931409
<tr>
13941410
<td> <b>ArrayType</b> </td>
13951411
<td> java.util.List </td>
@@ -1537,6 +1553,13 @@ from pyspark.sql import *
15371553
TimestampType()
15381554
</td>
15391555
</tr>
1556+
<tr>
1557+
<td> <b>DateType</b> </td>
1558+
<td> datetime.date </td>
1559+
<td>
1560+
DateType()
1561+
</td>
1562+
</tr>
15401563
<tr>
15411564
<td> <b>ArrayType</b> </td>
15421565
<td> list, tuple, or array </td>

0 commit comments

Comments
 (0)