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 2021/08/17 19:47:58 UTC
[spark] branch branch-3.2 updated: [SPARK-36535][SQL] Refine the
sql reference doc
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 5107ad3 [SPARK-36535][SQL] Refine the sql reference doc
5107ad3 is described below
commit 5107ad3157c07c91fec2e30fc97e72684b84cf14
Author: Wenchen Fan <we...@databricks.com>
AuthorDate: Tue Aug 17 12:46:38 2021 -0700
[SPARK-36535][SQL] Refine the sql reference doc
### What changes were proposed in this pull request?
Refine the SQL reference doc:
- remove useless subitems in the sidebar
- remove useless sub-menu-pages (e.g. `sql-ref-syntax-aux.md`)
- avoid using `#####` in `sql-ref-literals.md`
### Why are the changes needed?
The subitems in the sidebar are quite useless, as the menu page serves the same functionalities:
<img width="1040" alt="WX20210817-2358402x" src="https://user-images.githubusercontent.com/3182036/129765924-d7e69bc1-e351-4581-a6de-f2468022f372.png">
It's also extra work to keep the manu page and sidebar subitems in sync (The ANSI compliance page is already out of sync).
The sub-menu-pages are only referenced by the sidebar, and duplicates the content of the menu page. As a result, the `sql-ref-syntax-aux.md` is already outdated compared to the menu page. It's easier to just look at the menu page.
The `#####` is not rendered properly:
<img width="776" alt="WX20210818-0001192x" src="https://user-images.githubusercontent.com/3182036/129766760-6f385443-e597-44aa-888d-14d128d45f84.png">
It's better to avoid using it.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
N/A
Closes #33767 from cloud-fan/doc.
Authored-by: Wenchen Fan <we...@databricks.com>
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
(cherry picked from commit 4b015e8d7d6f5972341104f2a359bb9d09c4385b)
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
docs/_data/menu-sql.yaml | 187 +-------------------------------------
docs/sql-ref-literals.md | 42 ++++-----
docs/sql-ref-syntax-aux.md | 29 ------
docs/sql-ref-syntax-ddl.md | 37 --------
docs/sql-ref-syntax-dml-insert.md | 27 ------
docs/sql-ref-syntax-dml.md | 25 -----
docs/sql-ref-syntax-qry.md | 53 -----------
docs/sql-ref-syntax.md | 12 +++
8 files changed, 34 insertions(+), 378 deletions(-)
diff --git a/docs/_data/menu-sql.yaml b/docs/_data/menu-sql.yaml
index e7b22c4..22e01df 100644
--- a/docs/_data/menu-sql.yaml
+++ b/docs/_data/menu-sql.yaml
@@ -75,28 +75,12 @@
subitems:
- text: ANSI Compliance
url: sql-ref-ansi-compliance.html
- subitems:
- - text: Arithmetic Operations
- url: sql-ref-ansi-compliance.html#arithmetic-operations
- - text: Type Conversion
- url: sql-ref-ansi-compliance.html#type-conversion
- - text: SQL Keywords
- url: sql-ref-ansi-compliance.html#sql-keywords
- text: Data Types
url: sql-ref-datatypes.html
- text: Datetime Pattern
url: sql-ref-datetime-pattern.html
- text: Functions
url: sql-ref-functions.html
- subitems:
- - text: Built-in Functions
- url: sql-ref-functions-builtin.html
- - text: Scalar UDFs (User-Defined Functions)
- url: sql-ref-functions-udf-scalar.html
- - text: UDAFs (User-Defined Aggregate Functions)
- url: sql-ref-functions-udf-aggregate.html
- - text: Integration with Hive UDFs/UDAFs/UDTFs
- url: sql-ref-functions-udf-hive.html
- text: Identifiers
url: sql-ref-identifier.html
- text: Literals
@@ -107,173 +91,10 @@
url: sql-ref-syntax.html
subitems:
- text: Data Definition Statements
- url: sql-ref-syntax-ddl.html
- subitems:
- - text: ALTER DATABASE
- url: sql-ref-syntax-ddl-alter-database.html
- - text: ALTER TABLE
- url: sql-ref-syntax-ddl-alter-table.html
- - text: ALTER VIEW
- url: sql-ref-syntax-ddl-alter-view.html
- - text: CREATE DATABASE
- url: sql-ref-syntax-ddl-create-database.html
- - text: CREATE FUNCTION
- url: sql-ref-syntax-ddl-create-function.html
- - text: CREATE TABLE
- url: sql-ref-syntax-ddl-create-table.html
- - text: CREATE VIEW
- url: sql-ref-syntax-ddl-create-view.html
- - text: DROP DATABASE
- url: sql-ref-syntax-ddl-drop-database.html
- - text: DROP FUNCTION
- url: sql-ref-syntax-ddl-drop-function.html
- - text: DROP TABLE
- url: sql-ref-syntax-ddl-drop-table.html
- - text: DROP VIEW
- url: sql-ref-syntax-ddl-drop-view.html
- - text: TRUNCATE TABLE
- url: sql-ref-syntax-ddl-truncate-table.html
- - text: REPAIR TABLE
- url: sql-ref-syntax-ddl-repair-table.html
- - text: USE DATABASE
- url: sql-ref-syntax-ddl-usedb.html
+ url: sql-ref-syntax.html#ddl-statements
- text: Data Manipulation Statements
- url: sql-ref-syntax-dml.html
- subitems:
- - text: INSERT
- url: sql-ref-syntax-dml-insert.html
- - text: LOAD
- url: sql-ref-syntax-dml-load.html
+ url: sql-ref-syntax.html#dml-statements
- text: Data Retrieval(Queries)
- url: sql-ref-syntax-qry.html
- subitems:
- - text: SELECT
- url: sql-ref-syntax-qry-select.html
- subitems:
- - text: WHERE Clause
- url: sql-ref-syntax-qry-select-where.html
- - text: GROUP BY Clause
- url: sql-ref-syntax-qry-select-groupby.html
- - text: HAVING Clause
- url: sql-ref-syntax-qry-select-having.html
- - text: ORDER BY Clause
- url: sql-ref-syntax-qry-select-orderby.html
- - text: SORT BY Clause
- url: sql-ref-syntax-qry-select-sortby.html
- - text: CLUSTER BY Clause
- url: sql-ref-syntax-qry-select-clusterby.html
- - text: DISTRIBUTE BY Clause
- url: sql-ref-syntax-qry-select-distribute-by.html
- - text: LIMIT Clause
- url: sql-ref-syntax-qry-select-limit.html
- - text: Common Table Expression
- url: sql-ref-syntax-qry-select-cte.html
- - text: Hints
- url: sql-ref-syntax-qry-select-hints.html
- - text: Inline Table
- url: sql-ref-syntax-qry-select-inline-table.html
- - text: File
- url: sql-ref-syntax-qry-select-file.html
- - text: JOIN
- url: sql-ref-syntax-qry-select-join.html
- - text: LIKE Predicate
- url: sql-ref-syntax-qry-select-like.html
- - text: Set Operators
- url: sql-ref-syntax-qry-select-setops.html
- - text: TABLESAMPLE
- url: sql-ref-syntax-qry-select-sampling.html
- - text: Table-valued Function
- url: sql-ref-syntax-qry-select-tvf.html
- - text: Window Function
- url: sql-ref-syntax-qry-select-window.html
- - text: CASE Clause
- url: sql-ref-syntax-qry-select-case.html
- - text: LATERAL VIEW Clause
- url: sql-ref-syntax-qry-select-lateral-view.html
- - text: PIVOT Clause
- url: sql-ref-syntax-qry-select-pivot.html
- - text: TRANSFORM Clause
- url: sql-ref-syntax-qry-select-transform.html
- - text: EXPLAIN
- url: sql-ref-syntax-qry-explain.html
+ url: sql-ref-syntax.html#data-retrieval-statements
- text: Auxiliary Statements
- url: sql-ref-syntax-aux.html
- subitems:
- - text: ANALYZE
- url: sql-ref-syntax-aux-analyze.html
- subitems:
- - text: ANALYZE TABLE
- url: sql-ref-syntax-aux-analyze-table.html
- - text: ANALYZE TABLES
- url: sql-ref-syntax-aux-analyze-tables.html
- - text: CACHE
- url: sql-ref-syntax-aux-cache.html
- subitems:
- - text: CACHE TABLE
- url: sql-ref-syntax-aux-cache-cache-table.html
- - text: UNCACHE TABLE
- url: sql-ref-syntax-aux-cache-uncache-table.html
- - text: CLEAR CACHE
- url: sql-ref-syntax-aux-cache-clear-cache.html
- - text: REFRESH TABLE
- url: sql-ref-syntax-aux-cache-refresh-table.html
- - text: REFRESH FUNCTION
- url: sql-ref-syntax-aux-cache-refresh-function.html
- - text: REFRESH
- url: sql-ref-syntax-aux-cache-refresh.html
- - text: DESCRIBE
- url: sql-ref-syntax-aux-describe.html
- subitems:
- - text: DESCRIBE DATABASE
- url: sql-ref-syntax-aux-describe-database.html
- - text: DESCRIBE TABLE
- url: sql-ref-syntax-aux-describe-table.html
- - text: DESCRIBE FUNCTION
- url: sql-ref-syntax-aux-describe-function.html
- - text: DESCRIBE QUERY
- url: sql-ref-syntax-aux-describe-query.html
- - text: SHOW
- url: sql-ref-syntax-aux-show.html
- subitems:
- - text: SHOW COLUMNS
- url: sql-ref-syntax-aux-show-columns.html
- - text: SHOW CREATE TABLE
- url: sql-ref-syntax-aux-show-create-table.html
- - text: SHOW DATABASES
- url: sql-ref-syntax-aux-show-databases.html
- - text: SHOW FUNCTIONS
- url: sql-ref-syntax-aux-show-functions.html
- - text: SHOW PARTITIONS
- url: sql-ref-syntax-aux-show-partitions.html
- - text: SHOW TABLE
- url: sql-ref-syntax-aux-show-table.html
- - text: SHOW TABLES
- url: sql-ref-syntax-aux-show-tables.html
- - text: SHOW TBLPROPERTIES
- url: sql-ref-syntax-aux-show-tblproperties.html
- - text: SHOW VIEWS
- url: sql-ref-syntax-aux-show-views.html
- - text: CONFIGURATION MANAGEMENT
- url: sql-ref-syntax-aux-conf-mgmt.html
- subitems:
- - text: SET
- url: sql-ref-syntax-aux-conf-mgmt-set.html
- - text: RESET
- url: sql-ref-syntax-aux-conf-mgmt-reset.html
- - text: SET TIME ZONE
- url: sql-ref-syntax-aux-conf-mgmt-set-timezone.html
- - text: RESOURCE MANAGEMENT
- url: sql-ref-syntax-aux-resource-mgmt.html
- subitems:
- - text: ADD FILE
- url: sql-ref-syntax-aux-resource-mgmt-add-file.html
- - text: ADD JAR
- url: sql-ref-syntax-aux-resource-mgmt-add-jar.html
- - text: ADD ARCHIVE
- url: sql-ref-syntax-aux-resource-mgmt-add-archive.html
- - text: LIST FILE
- url: sql-ref-syntax-aux-resource-mgmt-list-file.html
- - text: LIST JAR
- url: sql-ref-syntax-aux-resource-mgmt-list-jar.html
- - text: LIST ARCHIVE
- url: sql-ref-syntax-aux-resource-mgmt-list-archive.html
+ url: sql-ref-syntax.html#auxiliary-statements
diff --git a/docs/sql-ref-literals.md b/docs/sql-ref-literals.md
index 355ac69..7a81d36 100644
--- a/docs/sql-ref-literals.md
+++ b/docs/sql-ref-literals.md
@@ -144,16 +144,15 @@ SELECT TRUE AS col;
### Numeric Literal
A numeric literal is used to specify a fixed or floating-point number.
+There are two kinds of numeric literals: integral literal and fractional literal.
-#### Integral Literal
-
-##### Syntax
+#### Integral Literal Syntax
```sql
[ + | - ] digit [ ... ] [ L | S | Y ]
```
-##### Parameters
+#### Integral Literal Parameters
* **digit**
@@ -175,7 +174,7 @@ A numeric literal is used to specify a fixed or floating-point number.
Indicates a 4-byte signed integer number.
-##### Examples
+#### Integral Literal Examples
```sql
SELECT -2147483648 AS col;
@@ -207,9 +206,7 @@ SELECT 482S AS col;
+---+
```
-#### Fractional Literals
-
-##### Syntax
+#### Fractional Literals Syntax
decimal literals:
```sql
@@ -236,7 +233,7 @@ and exponent is defined as
E [ + | - ] digit [ ... ]
```
-##### Parameters
+#### Fractional Literals Parameters
* **digit**
@@ -254,7 +251,7 @@ E [ + | - ] digit [ ... ]
Case insensitive, indicates `DECIMAL`, with the total number of digits as precision and the number of digits to right of decimal point as scale.
-##### Examples
+#### Fractional Literals Examples
```sql
SELECT 12.578 AS col;
@@ -344,11 +341,9 @@ SELECT -3.E-3D AS col;
### Datetime Literal
-A Datetime literal is used to specify a datetime value.
+A datetime literal is used to specify a date or timestamp value.
-#### Date Literal
-
-##### Syntax
+#### Date Syntax
```sql
DATE { 'yyyy' |
@@ -358,7 +353,7 @@ DATE { 'yyyy' |
```
**Note:** defaults to `01` if month or day is not specified.
-##### Examples
+#### Date Examples
```sql
SELECT DATE '1997' AS col;
@@ -383,9 +378,7 @@ SELECT DATE '2011-11-11' AS col;
+----------+
```
-#### Timestamp Literal
-
-##### Syntax
+#### Timestamp Syntax
```sql
TIMESTAMP { 'yyyy' |
@@ -410,7 +403,7 @@ TIMESTAMP { 'yyyy' |
**Note:** defaults to the session local timezone (set via `spark.sql.session.timeZone`) if `zone_id` is not specified.
-##### Examples
+#### Timestamp Examples
```sql
SELECT TIMESTAMP '1997-01-31 09:26:56.123' AS col;
@@ -438,8 +431,9 @@ SELECT TIMESTAMP '1997-01' AS col;
### Interval Literal
An interval literal is used to specify a fixed period of time.
+The interval literal supports two syntaxes: ANSI syntax and multi-units syntax.
-#### ANSI style
+#### ANSI Syntax
The ANSI SQL standard defines interval literals in the form:
```sql
@@ -485,7 +479,7 @@ Formats of supported day-time interval literals:
|MINUTE TO SECOND|`[+|-]'[+|-]m:s.n'`|`INTERVAL '1000:01.001' MINUTE TO SECOND`|
|SECOND|`[+|-]'[+|-]s.n'`|`INTERVAL '1000.000001' SECOND`|
-##### Examples
+#### ANSI Examples
```sql
SELECT INTERVAL '2-3' YEAR TO MONTH AS col;
@@ -503,14 +497,14 @@ SELECT INTERVAL -'20 15:40:32.99899999' DAY TO SECOND AS col;
+--------------------------------------------+
```
-#### Multi-units style
+#### Multi-units Syntax
```sql
INTERVAL interval_value interval_unit [ interval_value interval_unit ... ] |
INTERVAL 'interval_value interval_unit [ interval_value interval_unit ... ]' |
```
-##### Parameters
+#### Multi-units Parameters
* **interval_value**
@@ -527,7 +521,7 @@ INTERVAL 'interval_value interval_unit [ interval_value interval_unit ... ]' |
Mix of the YEAR[S] or MONTH[S] interval units with other units is not allowed.
-##### Examples
+#### Multi-units Examples
```sql
SELECT INTERVAL 3 YEAR AS col;
diff --git a/docs/sql-ref-syntax-aux.md b/docs/sql-ref-syntax-aux.md
deleted file mode 100644
index 3cd758f..0000000
--- a/docs/sql-ref-syntax-aux.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-layout: global
-title: Auxiliary Statements
-displayTitle: Auxiliary Statements
-license: |
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
----
-
-Besides the major SQL statements such as Data Definition Statements, Data Manipulation Statements and Data Retrieval Statements, Spark SQL also supports the following Auxiliary Statements:
-
- * [ANALYZE](sql-ref-syntax-aux-analyze.html)
- * [CACHE](sql-ref-syntax-aux-cache.html)
- * [DESCRIBE](sql-ref-syntax-aux-describe.html)
- * [SHOW](sql-ref-syntax-aux-show.html)
- * [CONFIGURATION MANAGEMENT](sql-ref-syntax-aux-conf-mgmt.html)
- * [RESOURCE MANAGEMENT](sql-ref-syntax-aux-resource-mgmt.html)
diff --git a/docs/sql-ref-syntax-ddl.md b/docs/sql-ref-syntax-ddl.md
deleted file mode 100644
index cb3e04c..0000000
--- a/docs/sql-ref-syntax-ddl.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-layout: global
-title: Data Definition Statements
-displayTitle: Data Definition Statements
-license: |
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
----
-
-Data Definition Statements are used to create or modify the structure of database objects in a database. Spark SQL supports the following Data Definition Statements:
-
- * [ALTER DATABASE](sql-ref-syntax-ddl-alter-database.html)
- * [ALTER TABLE](sql-ref-syntax-ddl-alter-table.html)
- * [ALTER VIEW](sql-ref-syntax-ddl-alter-view.html)
- * [CREATE DATABASE](sql-ref-syntax-ddl-create-database.html)
- * [CREATE FUNCTION](sql-ref-syntax-ddl-create-function.html)
- * [CREATE TABLE](sql-ref-syntax-ddl-create-table.html)
- * [CREATE VIEW](sql-ref-syntax-ddl-create-view.html)
- * [DROP DATABASE](sql-ref-syntax-ddl-drop-database.html)
- * [DROP FUNCTION](sql-ref-syntax-ddl-drop-function.html)
- * [DROP TABLE](sql-ref-syntax-ddl-drop-table.html)
- * [DROP VIEW](sql-ref-syntax-ddl-drop-view.html)
- * [TRUNCATE TABLE](sql-ref-syntax-ddl-truncate-table.html)
- * [REPAIR TABLE](sql-ref-syntax-ddl-repair-table.html)
- * [USE DATABASE](sql-ref-syntax-ddl-usedb.html)
diff --git a/docs/sql-ref-syntax-dml-insert.md b/docs/sql-ref-syntax-dml-insert.md
deleted file mode 100644
index 62f6dee..0000000
--- a/docs/sql-ref-syntax-dml-insert.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-layout: global
-title: INSERT
-displayTitle: INSERT
-license: |
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
----
-
-The INSERT statements:
-
-* [INSERT INTO statement](sql-ref-syntax-dml-insert-into.html)
-* [INSERT OVERWRITE statement](sql-ref-syntax-dml-insert-overwrite-table.html)
-* [INSERT OVERWRITE DIRECTORY statement](sql-ref-syntax-dml-insert-overwrite-directory.html)
-* [INSERT OVERWRITE DIRECTORY with Hive format statement](sql-ref-syntax-dml-insert-overwrite-directory-hive.html)
diff --git a/docs/sql-ref-syntax-dml.md b/docs/sql-ref-syntax-dml.md
deleted file mode 100644
index fc408e1..0000000
--- a/docs/sql-ref-syntax-dml.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-layout: global
-title: Data Manipulation Statements
-displayTitle: Data Manipulation Statements
-license: |
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
----
-
-Data Manipulation Statements are used to add, change, or delete data. Spark SQL supports the following Data Manipulation Statements:
-
-* [INSERT](sql-ref-syntax-dml-insert.html)
-* [LOAD](sql-ref-syntax-dml-load.html)
diff --git a/docs/sql-ref-syntax-qry.md b/docs/sql-ref-syntax-qry.md
deleted file mode 100644
index 9fb62df..0000000
--- a/docs/sql-ref-syntax-qry.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-layout: global
-title: Data Retrieval
-displayTitle: Data Retrieval
-license: |
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
----
-
-Spark supports <code>SELECT</code> statement that is used to retrieve rows
-from one or more tables according to the specified clauses. The full syntax
-and brief description of supported clauses are explained in
-[SELECT](sql-ref-syntax-qry-select.html) section. The SQL statements related
-to SELECT are also included in this section. Spark also provides the
-ability to generate logical and physical plan for a given query using
-[EXPLAIN](sql-ref-syntax-qry-explain.html) statement.
-
-* [SELECT Statement](sql-ref-syntax-qry-select.html)
- * [WHERE Clause](sql-ref-syntax-qry-select-where.html)
- * [GROUP BY Clause](sql-ref-syntax-qry-select-groupby.html)
- * [HAVING Clause](sql-ref-syntax-qry-select-having.html)
- * [ORDER BY Clause](sql-ref-syntax-qry-select-orderby.html)
- * [SORT BY Clause](sql-ref-syntax-qry-select-sortby.html)
- * [CLUSTER BY Clause](sql-ref-syntax-qry-select-clusterby.html)
- * [DISTRIBUTE BY Clause](sql-ref-syntax-qry-select-distribute-by.html)
- * [LIMIT Clause](sql-ref-syntax-qry-select-limit.html)
- * [Common Table Expression](sql-ref-syntax-qry-select-cte.html)
- * [Hints](sql-ref-syntax-qry-select-hints.html)
- * [Inline Table](sql-ref-syntax-qry-select-inline-table.html)
- * [File](sql-ref-syntax-qry-select-file.html)
- * [JOIN](sql-ref-syntax-qry-select-join.html)
- * [LIKE Predicate](sql-ref-syntax-qry-select-like.html)
- * [Set Operators](sql-ref-syntax-qry-select-setops.html)
- * [TABLESAMPLE](sql-ref-syntax-qry-select-sampling.html)
- * [Table-valued Function](sql-ref-syntax-qry-select-tvf.html)
- * [Window Function](sql-ref-syntax-qry-select-window.html)
- * [CASE Clause](sql-ref-syntax-qry-select-case.html)
- * [PIVOT Clause](sql-ref-syntax-qry-select-pivot.html)
- * [LATERAL VIEW Clause](sql-ref-syntax-qry-select-lateral-view.html)
- * [TRANSFORM Clause](sql-ref-syntax-qry-select-transform.html)
-* [EXPLAIN Statement](sql-ref-syntax-qry-explain.html)
diff --git a/docs/sql-ref-syntax.md b/docs/sql-ref-syntax.md
index f02b1ac..cb7a04d 100644
--- a/docs/sql-ref-syntax.md
+++ b/docs/sql-ref-syntax.md
@@ -23,6 +23,8 @@ Spark SQL is Apache Spark's module for working with structured data. The SQL Syn
### DDL Statements
+Data Definition Statements are used to create or modify the structure of database objects in a database. Spark SQL supports the following Data Definition Statements:
+
* [ALTER DATABASE](sql-ref-syntax-ddl-alter-database.html)
* [ALTER TABLE](sql-ref-syntax-ddl-alter-table.html)
* [ALTER VIEW](sql-ref-syntax-ddl-alter-view.html)
@@ -40,6 +42,8 @@ Spark SQL is Apache Spark's module for working with structured data. The SQL Syn
### DML Statements
+Data Manipulation Statements are used to add, change, or delete data. Spark SQL supports the following Data Manipulation Statements:
+
* [INSERT INTO](sql-ref-syntax-dml-insert-into.html)
* [INSERT OVERWRITE](sql-ref-syntax-dml-insert-overwrite-table.html)
* [INSERT OVERWRITE DIRECTORY](sql-ref-syntax-dml-insert-overwrite-directory.html)
@@ -48,6 +52,14 @@ Spark SQL is Apache Spark's module for working with structured data. The SQL Syn
### Data Retrieval Statements
+Spark supports <code>SELECT</code> statement that is used to retrieve rows
+from one or more tables according to the specified clauses. The full syntax
+and brief description of supported clauses are explained in
+[SELECT](sql-ref-syntax-qry-select.html) section. The SQL statements related
+to SELECT are also included in this section. Spark also provides the
+ability to generate logical and physical plan for a given query using
+[EXPLAIN](sql-ref-syntax-qry-explain.html) statement.
+
* [SELECT Statement](sql-ref-syntax-qry-select.html)
* [Common Table Expression](sql-ref-syntax-qry-select-cte.html)
* [CLUSTER BY Clause](sql-ref-syntax-qry-select-clusterby.html)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org