Skip to content

Commit 01b26c4

Browse files
huaxingaomaropu
authored andcommitted
[SPARK-31305][SQL][DOCS] Add a page to list all commands in SQL Reference
### What changes were proposed in this pull request? Add a page to list all commands in SQL Reference... ### Why are the changes needed? so it's easier for user to find a specific command. ### Does this PR introduce any user-facing change? before: ![image](https://user-images.githubusercontent.com/13592258/77938658-ec03e700-726a-11ea-983c-7a559cc0aae2.png) after: ![image](https://user-images.githubusercontent.com/13592258/77937899-d3df9800-7269-11ea-85db-749a9521576a.png) ![image](https://user-images.githubusercontent.com/13592258/77937924-db9f3c80-7269-11ea-9441-7603feee421c.png) Also move ```use database``` from query category to ddl category. ### How was this patch tested? Manually build and check Closes #28074 from huaxingao/list-all. Authored-by: Huaxin Gao <[email protected]> Signed-off-by: Takeshi Yamamuro <[email protected]> (cherry picked from commit 1a7f964) Signed-off-by: Takeshi Yamamuro <[email protected]>
1 parent 207344d commit 01b26c4

File tree

3 files changed

+64
-3
lines changed

3 files changed

+64
-3
lines changed

docs/_data/menu-sql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
url: sql-ref-syntax-ddl-truncate-table.html
124124
- text: REPAIR TABLE
125125
url: sql-ref-syntax-ddl-repair-table.html
126+
- text: USE DATABASE
127+
url: sql-ref-syntax-qry-select-usedb.html
126128
- text: Data Manipulation Statements
127129
url: sql-ref-syntax-dml.html
128130
subitems:
@@ -152,8 +154,6 @@
152154
url: sql-ref-syntax-qry-select-distribute-by.html
153155
- text: LIMIT Clause
154156
url: sql-ref-syntax-qry-select-limit.html
155-
- text: USE database
156-
url: sql-ref-syntax-qry-select-usedb.html
157157
- text: EXPLAIN
158158
url: sql-ref-syntax-qry-explain.html
159159
- text: Auxiliary Statements

docs/sql-ref-syntax-ddl.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ Data Definition Statements are used to create or modify the structure of databas
3636
- [DROP VIEW](sql-ref-syntax-ddl-drop-view.html)
3737
- [TRUNCATE TABLE](sql-ref-syntax-ddl-truncate-table.html)
3838
- [REPAIR TABLE](sql-ref-syntax-ddl-repair-table.html)
39+
- [USE DATABASE](sql-ref-syntax-qry-select-usedb.html)

docs/sql-ref-syntax.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,64 @@ license: |
1919
limitations under the License.
2020
---
2121

22-
Spark SQL is Apache Spark's module for working with structured data. The SQL Syntax section describes the SQL syntax in detail along with usage examples when applicable.
22+
Spark SQL is Apache Spark's module for working with structured data. The SQL Syntax section describes the SQL syntax in detail along with usage examples when applicable. This document provides a list of Data Definition and Data Manipulation Statements, as well as Data Retrieval and Auxiliary Statements.
23+
24+
### DDL Statements
25+
- [ALTER DATABASE](sql-ref-syntax-ddl-alter-database.html)
26+
- [ALTER TABLE](sql-ref-syntax-ddl-alter-table.html)
27+
- [ALTER VIEW](sql-ref-syntax-ddl-alter-view.html)
28+
- [CREATE DATABASE](sql-ref-syntax-ddl-create-database.html)
29+
- [CREATE FUNCTION](sql-ref-syntax-ddl-create-function.html)
30+
- [CREATE TABLE](sql-ref-syntax-ddl-create-table.html)
31+
- [CREATE VIEW](sql-ref-syntax-ddl-create-view.html)
32+
- [DROP DATABASE](sql-ref-syntax-ddl-drop-database.html)
33+
- [DROP FUNCTION](sql-ref-syntax-ddl-drop-function.html)
34+
- [DROP TABLE](sql-ref-syntax-ddl-drop-table.html)
35+
- [DROP VIEW](sql-ref-syntax-ddl-drop-view.html)
36+
- [REPAIR TABLE](sql-ref-syntax-ddl-repair-table.html)
37+
- [TRUNCATE TABLE](sql-ref-syntax-ddl-truncate-table.html)
38+
- [USE DATABASE](sql-ref-syntax-qry-select-usedb.html)
39+
40+
### DML Statements
41+
- [INSERT INTO](sql-ref-syntax-dml-insert-into.html)
42+
- [INSERT OVERWRITE](sql-ref-syntax-dml-insert-overwrite-table.html)
43+
- [INSERT OVERWRITE DIRECTORY](sql-ref-syntax-dml-insert-overwrite-directory.html)
44+
- [INSERT OVERWRITE DIRECTORY with Hive format](sql-ref-syntax-dml-insert-overwrite-directory-hive.html)
45+
- [LOAD](sql-ref-syntax-dml-load.html)
46+
47+
### Data Retrieval Statements
48+
- [CLUSTER BY Clause](sql-ref-syntax-qry-select-clusterby.html)
49+
- [DISTRIBUTE BY Clause](sql-ref-syntax-qry-select-distribute-by.html)
50+
- [EXPLAIN](sql-ref-syntax-qry-explain.html)
51+
- [GROUP BY Clause](sql-ref-syntax-qry-select-groupby.html)
52+
- [HAVING Clause](sql-ref-syntax-qry-select-having.html)
53+
- [LIMIT Clause](sql-ref-syntax-qry-select-limit.html)
54+
- [ORDER BY Clause](sql-ref-syntax-qry-select-orderby.html)
55+
- [SORT BY Clause](sql-ref-syntax-qry-select-sortby.html)
56+
- [WHERE Clause](sql-ref-syntax-qry-select-where.html)
57+
58+
### Auxiliary Statements
59+
- [ADD FILE](sql-ref-syntax-aux-resource-mgmt-add-file.html)
60+
- [ADD JAR](sql-ref-syntax-aux-resource-mgmt-add-jar.html)
61+
- [ANALYZE TABLE](sql-ref-syntax-aux-analyze-table.html)
62+
- [CACHE TABLE](sql-ref-syntax-aux-cache-cache-table.html)
63+
- [CLEAR CACHE](sql-ref-syntax-aux-cache-clear-cache.html)
64+
- [DESCRIBE DATABASE](sql-ref-syntax-aux-describe-database.html)
65+
- [DESCRIBE FUNCTION](sql-ref-syntax-aux-describe-function.html)
66+
- [DESCRIBE QUERY](sql-ref-syntax-aux-describe-query.html)
67+
- [DESCRIBE TABLE](sql-ref-syntax-aux-describe-table.html)
68+
- [LIST FILE](sql-ref-syntax-aux-resource-mgmt-list-file.html)
69+
- [LIST JAR](sql-ref-syntax-aux-resource-mgmt-list-jar.html)
70+
- [REFRESH](sql-ref-syntax-aux-cache-refresh.html)
71+
- [REFRESH TABLE](sql-ref-syntax-aux-refresh-table.html)
72+
- [SET](sql-ref-syntax-aux-conf-mgmt-set.html)
73+
- [SHOW COLUMNS](sql-ref-syntax-aux-show-columns.html)
74+
- [SHOW CREATE TABLE](sql-ref-syntax-aux-show-create-table.html)
75+
- [SHOW DATABASES](sql-ref-syntax-aux-show-databases.html)
76+
- [SHOW FUNCTIONS](sql-ref-syntax-aux-show-functions.html)
77+
- [SHOW PARTITIONS](sql-ref-syntax-aux-show-partitions.html)
78+
- [SHOW TABLE EXTENDED](sql-ref-syntax-aux-show-table.html)
79+
- [SHOW TABLES](sql-ref-syntax-aux-show-tables.html)
80+
- [SHOW TBLPROPERTIES](sql-ref-syntax-aux-show-tblproperties.html)
81+
- [UNCACHE TABLE](sql-ref-syntax-aux-cache-uncache-table.html)
82+
- [UNSET](sql-ref-syntax-aux-conf-mgmt-reset.html)

0 commit comments

Comments
 (0)