Skip to content

Commit 92bda1b

Browse files
committed
[SPARK-31612][SQL][DOCS] SQL Reference clean up
1 parent dcc0902 commit 92bda1b

19 files changed

+41
-33
lines changed

docs/sql-ref-syntax-aux-describe-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ interchangeable.
4242
</dd>
4343
</dl>
4444

45-
### Example
45+
### Examples
4646

4747
{% highlight sql %}
4848
-- Create employees DATABASE

docs/sql-ref-syntax-aux-show-tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ SHOW TABLES [ { FROM | IN } database_name ] [ LIKE 'regex_pattern' ]
5252
</dd>
5353
</dl>
5454

55-
### Example
55+
### Examples
5656

5757
{% highlight sql %}
5858
-- List all tables in default database

docs/sql-ref-syntax-aux-show-views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ SHOW VIEWS [ { FROM | IN } database_name ] [ LIKE 'regex_pattern' ]
5151
</dd>
5252
</dl>
5353

54-
### Example
54+
### Examples
5555
{% highlight sql %}
5656
-- Create views in different databases, also create global/local temp views.
5757
CREATE VIEW sam AS SELECT id, salary FROM employee WHERE name = 'sam';

docs/sql-ref-syntax-ddl-alter-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ for a database and may be used for auditing purposes.
3131

3232
{% highlight sql %}
3333
ALTER { DATABASE | SCHEMA } database_name
34-
SET DBPROPERTIES ( property_name = property_value, ... )
34+
SET DBPROPERTIES ( property_name = property_value [ , ... ] )
3535
{% endhighlight %}
3636

3737
### Parameters

docs/sql-ref-syntax-ddl-alter-table.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ALTER TABLE table_identifier partition_spec RENAME TO partition_spec
6666
#### Syntax
6767

6868
{% highlight sql %}
69-
ALTER TABLE table_identifier ADD COLUMNS ( col_spec [ , col_spec ... ] )
69+
ALTER TABLE table_identifier ADD COLUMNS ( col_spec [ , ... ] )
7070
{% endhighlight %}
7171

7272
#### Parameters
@@ -84,7 +84,7 @@ ALTER TABLE table_identifier ADD COLUMNS ( col_spec [ , col_spec ... ] )
8484

8585
<dl>
8686
<dt><code><em>COLUMNS ( col_spec )</em></code></dt>
87-
<dd>Specifies the columns to be added to be renamed.</dd>
87+
<dd>Specifies the columns to be added.</dd>
8888
</dl>
8989

9090
### ALTER OR CHANGE COLUMN

docs/sql-ref-syntax-ddl-alter-view.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ALTER VIEW view_identifier UNSET TBLPROPERTIES [ IF EXISTS ] ( property_key [ ,
105105
</dl>
106106

107107
#### ALTER View AS SELECT
108-
`ALTER VIEW view_identifier AS SELECT` statement changes the definition of a view, the `SELECT` statement must be valid,
108+
`ALTER VIEW view_identifier AS SELECT` statement changes the definition of a view. The `SELECT` statement must be valid,
109109
and the `view_identifier` must exist.
110110

111111
#### Syntax
@@ -127,7 +127,7 @@ Note that `ALTER VIEW` statement does not support `SET SERDE` or `SET SERDEPROPE
127127
</dd>
128128
<dt><code><em>select_statement</em></code></dt>
129129
<dd>
130-
Specifies the definition of the view, detail check <a href="sql-ref-syntax-qry-select.html">select_statement</a>
130+
Specifies the definition of the view. Check <a href="sql-ref-syntax-qry-select.html">select_statement</a> for details.
131131
</dd>
132132
</dl>
133133

@@ -136,7 +136,7 @@ Note that `ALTER VIEW` statement does not support `SET SERDE` or `SET SERDEPROPE
136136
{% highlight sql %}
137137
-- Rename only changes the view name.
138138
-- The source and target databases of the view have to be the same.
139-
-- Use qualified or unqualified name for the source and target view
139+
-- Use qualified or unqualified name for the source and target view.
140140
ALTER VIEW tempdb1.v1 RENAME TO tempdb1.v2;
141141

142142
-- Verify that the new view is created.

docs/sql-ref-syntax-ddl-create-function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ all sessions. The resources specified in the `USING` clause are made available
2828
to all executors when they are executed for the first time. In addition to the
2929
SQL interface, spark allows users to create custom user defined scalar and
3030
aggregate functions using Scala, Python and Java APIs. Please refer to
31-
[scalar_functions](sql-getting-started.html#scalar-functions) and
32-
[aggregate functions](sql-getting-started#aggregations) for more information.
31+
[Scalar UDFs](sql-ref-functions-udf-scalar.html) and
32+
[UDAFs](sql-ref-functions-udf-aggregate.html) for more information.
3333

3434
### Syntax
3535

docs/sql-ref-syntax-ddl-create-table-datasource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The `CREATE TABLE` statement defines a new table using a Data Source.
2828
{% highlight sql %}
2929
CREATE TABLE [ IF NOT EXISTS ] table_identifier
3030
[ ( col_name1 col_type1 [ COMMENT col_comment1 ], ... ) ]
31-
[USING data_source]
31+
[ USING data_source ]
3232
[ OPTIONS ( key1=val1, key2=val2, ... ) ]
3333
[ PARTITIONED BY ( col_name1, col_name2, ... ) ]
3434
[ CLUSTERED BY ( col_name3, col_name4, ... )

docs/sql-ref-syntax-ddl-create-view.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ CREATE [ OR REPLACE ] [ [ GLOBAL ] TEMPORARY ] VIEW [ IF NOT EXISTS ] view_ident
4242
<dt><code><em>[ GLOBAL ] TEMPORARY</em></code></dt>
4343
<dd>TEMPORARY views are session-scoped and will be dropped when session ends
4444
because it skips persisting the definition in the underlying metastore, if any.
45-
GLOBAL TEMPORARY views are tied to a system preserved temporary database `global_temp`.</dd>
45+
GLOBAL TEMPORARY views are tied to a system preserved temporary database <code>global_temp</code>.</dd>
4646
</dl>
4747
<dl>
4848
<dt><code><em>IF NOT EXISTS</em></code></dt>
@@ -64,7 +64,7 @@ CREATE [ OR REPLACE ] [ [ GLOBAL ] TEMPORARY ] VIEW [ IF NOT EXISTS ] view_ident
6464
<ul>
6565
<li><code>[ ( column_name [ COMMENT column_comment ], ... ) ]</code> to specify column-level comments.</li>
6666
<li><code>[ COMMENT view_comment ]</code> to specify view-level comments.</li>
67-
<li><code>[ TBLPROPERTIES ( property_name = property_value, ... ) ]</code> to add metadata key-value pairs.</li>
67+
<li><code>[ TBLPROPERTIES ( property_name = property_value [ , ... ] ) ]</code> to add metadata key-value pairs.</li>
6868
</ul>
6969
</dd>
7070
</dl>

docs/sql-ref-syntax-ddl-drop-database.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ exception will be thrown if the database does not exist in the system.
2727
### Syntax
2828

2929
{% highlight sql %}
30-
DROP ( DATABASE | SCHEMA ) [ IF EXISTS ] dbname [ RESTRICT | CASCADE ]
30+
DROP { DATABASE | SCHEMA } [ IF EXISTS ] dbname [ RESTRICT | CASCADE ]
3131
{% endhighlight %}
3232

3333
### Parameters
3434

3535
<dl>
3636
<dt><code><em>DATABASE | SCHEMA</em></code></dt>
37-
<dd>`DATABASE` and `SCHEMA` mean the same thing, either of them can be used.</dd>
37+
<dd><code>DATABASE</code> and <code>SCHEMA</code> mean the same thing, either of them can be used.</dd>
3838
</dl>
3939

4040
<dl>
@@ -52,7 +52,7 @@ DROP ( DATABASE | SCHEMA ) [ IF EXISTS ] dbname [ RESTRICT | CASCADE ]
5252
<dd>If specified, will drop all the associated tables and functions.</dd>
5353
</dl>
5454

55-
### Example
55+
### Examples
5656

5757
{% highlight sql %}
5858
-- Create `inventory_db` Database

0 commit comments

Comments
 (0)