You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2020/02/08 22:29:32 UTC
[spark] branch branch-3.0 updated: [SPARK-29587][DOC][FOLLOWUP] Add
`SQL` tab in the `Data Types` page
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 287d93f [SPARK-29587][DOC][FOLLOWUP] Add `SQL` tab in the `Data Types` page
287d93f is described below
commit 287d93fa1c5232fcbb5c4fe0ddbb4aeca39cd6b9
Author: Yuanjian Li <xy...@gmail.com>
AuthorDate: Sat Feb 8 14:28:15 2020 -0800
[SPARK-29587][DOC][FOLLOWUP] Add `SQL` tab in the `Data Types` page
### What changes were proposed in this pull request?
Add the new tab `SQL` in the `Data Types` page.
### Why are the changes needed?
New type added in SPARK-29587.
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
Locally test by Jekyll.
![image](https://user-images.githubusercontent.com/4833765/73908593-2e511d80-48e5-11ea-85a7-6ee451e6b727.png)
Closes #27447 from xuanyuanking/SPARK-29587-follow.
Authored-by: Yuanjian Li <xy...@gmail.com>
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
(cherry picked from commit e1cd4d9dc25ac3abe33c07686fc2a7d1f2b5c122)
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
docs/sql-ref-datatypes.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/docs/sql-ref-datatypes.md b/docs/sql-ref-datatypes.md
index 0add62b..9700608 100644
--- a/docs/sql-ref-datatypes.md
+++ b/docs/sql-ref-datatypes.md
@@ -631,4 +631,79 @@ from pyspark.sql.types import *
</tr>
</table>
</div>
+
+<div data-lang="sql" markdown="1">
+
+The following table shows the type names as well as aliases used in Spark SQL parser for each data type.
+
+<table class="table">
+<tr>
+ <th style="width:40%">Data type</th>
+ <th>SQL name</th></tr>
+<tr>
+ <td> <b>BooleanType</b> </td>
+ <td> BOOLEAN </td>
+</tr>
+<tr>
+ <td> <b>ByteType</b> </td>
+ <td> BYTE, TINYINT </td>
+</tr>
+<tr>
+ <td> <b>ShortType</b> </td>
+ <td> SHORT, SMALLINT </td>
+</tr>
+<tr>
+ <td> <b>IntegerType</b> </td>
+ <td> INT, INTEGER </td>
+</tr>
+<tr>
+ <td> <b>LongType</b> </td>
+ <td> LONG, BIGINT </td>
+</tr>
+<tr>
+ <td> <b>FloatType</b> </td>
+ <td> FLOAT, REAL </td>
+</tr>
+<tr>
+ <td> <b>DoubleType</b> </td>
+ <td> DOUBLE </td>
+</tr>
+<tr>
+ <td> <b>DateType</b> </td>
+ <td> DATE </td>
+</tr>
+<tr>
+ <td> <b>TimestampType</b> </td>
+ <td> TIMESTAMP </td>
+</tr>
+<tr>
+ <td> <b>StringType</b> </td>
+ <td> STRING </td>
+</tr>
+<tr>
+ <td> <b>BinaryType</b> </td>
+ <td> BINARY </td>
+</tr>
+<tr>
+ <td> <b>DecimalType</b> </td>
+ <td> DECIMAL, DEC, NUMERIC </td>
+</tr>
+<tr>
+ <td> <b>CalendarIntervalType</b> </td>
+ <td> INTERVAL </td>
+</tr>
+<tr>
+ <td> <b>ArrayType</b> </td>
+ <td> ARRAY<element_type> </td>
+</tr>
+<tr>
+ <td> <b>StructType</b> </td>
+ <td> STRUCT<field1_name: field1_type, field2_name: field2_type, ...> </td>
+</tr>
+<tr>
+ <td> <b>MapType</b> </td>
+ <td> MAP<key_type, value_type> </td>
+</tr>
+</table>
+</div>
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org