Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-23028][docs] Improve documentation for pages of SQL. #16070

Merged
merged 5 commits into from
Jun 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content.zh/docs/dev/table/sql/alter.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ALTER DATABASE [catalog_name.]db_name SET (key1=val1, key2=val2, ...)

## ALTER FUNCTION

{% highlight sql%}
```sql
ALTER [TEMPORARY|TEMPORARY SYSTEM] FUNCTION
[IF EXISTS] [catalog_name.][db_name.]function_name
AS identifier [LANGUAGE JAVA|SCALA|PYTHON]
Expand Down
2 changes: 1 addition & 1 deletion docs/content.zh/docs/dev/table/sql/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ CREATE [TEMPORARY] VIEW [IF NOT EXISTS] [catalog_name.][db_name.]view_name
{{< top >}}

## CREATE FUNCTION
{% highlight sql%}
```sql
CREATE [TEMPORARY|TEMPORARY SYSTEM] FUNCTION
[IF NOT EXISTS] [[catalog_name.]db_name.]function_name
AS identifier [LANGUAGE JAVA|SCALA|PYTHON]
Expand Down
17 changes: 15 additions & 2 deletions docs/content.zh/docs/dev/table/sql/drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ under the License.



DROP 语句用于从当前或指定的 [Catalog]({{< ref "docs/dev/table/catalogs" >}}) 中删除一个已经注册的表、视图或函数。
DROP 语句可用于删除指定的 catalog,也可用于从当前或指定的 [Catalog]({{< ref "docs/dev/table/catalogs" >}}) 中删除一个已经注册的表、视图或函数。

Flink SQL 目前支持以下 DROP 语句:

- DROP CATALOG
- DROP TABLE
- DROP DATABASE
- DROP VIEW
Expand Down Expand Up @@ -146,6 +147,18 @@ Flink SQL> SHOW TABLES;
{{< /tab >}}
{{< /tabs >}}

## DROP CATALOG

```sql
DROP CATALOG [IF EXISTS] catalog_name
```

删除给定名字的 catalog。

**IF EXISTS**

如果目标 catalog 不存在,则不会执行任何操作。

## DROP TABLE

```sql
Expand Down Expand Up @@ -199,7 +212,7 @@ Flink 没有使用 CASCADE / RESTRICT 关键字来维护视图的依赖关系,

## DROP FUNCTION

{% highlight sql%}
```sql
DROP [TEMPORARY|TEMPORARY SYSTEM] FUNCTION [IF EXISTS] [catalog_name.][db_name.]function_name;
```

Expand Down
2 changes: 1 addition & 1 deletion docs/content.zh/docs/dev/table/sql/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Flink SQL> SHOW FULL MODULES;

{{< top >}}

## USE CATLOAG
## USE CATALOG

```sql
USE CATALOG catalog_name
Expand Down
15 changes: 14 additions & 1 deletion docs/content/docs/dev/table/sql/drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ under the License.

# DROP Statements

DROP statements are used to remove a registered table/view/function from current or specified [Catalog]({{< ref "docs/dev/table/catalogs" >}}).
DROP statements are used to remove a catalog with the given catalog name or to remove a registered table/view/function from the current or specified [Catalog]({{< ref "docs/dev/table/catalogs" >}}).

Flink SQL supports the following DROP statements for now:

- DROP CATALOG
- DROP TABLE
- DROP DATABASE
- DROP VIEW
Expand Down Expand Up @@ -138,6 +139,18 @@ Flink SQL> SHOW TABLES;
{{< /tab >}}
{{< /tabs >}}

## DROP CATALOG

```sql
DROP CATALOG [IF EXISTS] catalog_name
```

Drop a catalog with the given catalog name.

**IF EXISTS**

If the catalog does not exist, nothing happens.

## DROP TABLE

```sql
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/dev/table/sql/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Flink SQL> SHOW FULL MODULES;

{{< top >}}

## USE CATLOAG
## USE CATALOG

```sql
USE CATALOG catalog_name
Expand Down