Skip to content

Commit

Permalink
[FLINK-24218][doc]Translate "UNLOAD Statements" page of "SQL" into Ch…
Browse files Browse the repository at this point in the history
…inese
  • Loading branch information
hapihu committed Sep 9, 2021
1 parent 2e721ab commit 079151c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
36 changes: 21 additions & 15 deletions docs/content.zh/docs/dev/table/sql/unload.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,42 @@ specific language governing permissions and limitations
under the License.
-->

# UNLOAD Statements
<a name="unload-statements"></a>

UNLOAD statements are used to unload a built-in or user-defined module.
# UNLOAD 语句

## Run a UNLOAD statement
UNLOAD 语句用于卸载内置的或用户自定义的模块。

<a name=""></a>

## 执行 UNLOAD 语句

{{< tabs "unload statement" >}}
{{< tab "Java" >}}

UNLOAD statements can be executed with the `executeSql()` method of the `TableEnvironment`. The `executeSql()` method returns 'OK' for a successful LOAD operation; otherwise it will throw an exception.
可以使用 `TableEnvironment``executeSql()` 方法执行 UNLOAD 语句。如果 UNLOAD 操作执行成功,`executeSql()` 方法会返回 'OK',否则会抛出异常。

The following examples show how to run a UNLOAD statement in `TableEnvironment`.
以下示例展示了如何在 `TableEnvironment` 中执行一条 UNLOAD 语句。

{{< /tab >}}
{{< tab "Scala" >}}

UNLOAD statements can be executed with the `executeSql()` method of the `TableEnvironment`. The `executeSql()` method returns 'OK' for a successful LOAD operation; otherwise it will throw an exception.
可以使用 `TableEnvironment``executeSql()` 方法执行 UNLOAD 语句。如果 UNLOAD 操作执行成功,`executeSql()` 方法会返回 'OK',否则会抛出异常。

The following examples show how to run a UNLOAD statement in `TableEnvironment`.
以下示例展示了如何在 `TableEnvironment` 中执行一条 UNLOAD 语句。
{{< /tab >}}
{{< tab "Python" >}}

UNLOAD statements can be executed with the `executeSql()` method of the `TableEnvironment`. The `executeSql()` method returns 'OK' for a successful LOAD operation; otherwise it will throw an exception.
可以使用 `TableEnvironment``execute_sql()` 方法执行 UNLOAD 语句。如果 UNLOAD 操作执行成功,`execute_sql()` 方法会返回 'OK',否则会抛出异常。

The following examples show how to run a UNLOAD statement in `TableEnvironment`.
以下示例展示了如何在 `TableEnvironment` 中执行一条 UNLOAD 语句。

{{< /tab >}}
{{< tab "SQL CLI" >}}

UNLOAD statements can be executed in [SQL CLI]({{< ref "docs/dev/table/sqlClient" >}}).
UNLOAD 语句可以在 [SQL CLI]({{< ref "docs/dev/table/sqlClient" >}}) 中执行。

The following examples show how to run a UNLOAD statement in SQL CLI.
以下示例展示了如何在 SQL CLI 中执行一条 UNLOAD 语句。

{{< /tab >}}
{{< /tabs >}}
Expand All @@ -66,7 +70,7 @@ The following examples show how to run a UNLOAD statement in SQL CLI.
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);

// unload a core module
// 卸载 core 模块
tEnv.executeSql("UNLOAD MODULE core");
tEnv.executeSql("SHOW MODULES").print();
// Empty set
Expand All @@ -77,7 +81,7 @@ tEnv.executeSql("SHOW MODULES").print();
val env = StreamExecutionEnvironment.getExecutionEnvironment()
val tEnv = StreamTableEnvironment.create(env)

// unload a core module
// 卸载 core 模块
tEnv.executeSql("UNLOAD MODULE core")
tEnv.executeSql("SHOW MODULES").print()
// Empty set
Expand All @@ -87,7 +91,7 @@ tEnv.executeSql("SHOW MODULES").print()
```python
table_env = StreamTableEnvironment.create(...)

# unload a core module
# 卸载 core 模块
table_env.execute_sql("UNLOAD MODULE core")
table_env.execute_sql("SHOW MODULES").print()
# Empty set
Expand All @@ -106,9 +110,11 @@ Empty set

{{< top >}}

<a name="unload-module"></a>

## UNLOAD MODULE

The following grammar gives an overview of the available syntax:
以下语法概述了可用的语法规则:
```sql
UNLOAD MODULE module_name
```
2 changes: 1 addition & 1 deletion docs/content/docs/dev/table/sql/unload.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The following examples show how to run a UNLOAD statement in `TableEnvironment`.
{{< /tab >}}
{{< tab "Python" >}}

UNLOAD statements can be executed with the `executeSql()` method of the `TableEnvironment`. The `executeSql()` method returns 'OK' for a successful LOAD operation; otherwise it will throw an exception.
UNLOAD statements can be executed with the `execute_sql()` method of the `TableEnvironment`. The `execute_sql()` method returns 'OK' for a successful LOAD operation; otherwise it will throw an exception.

The following examples show how to run a UNLOAD statement in `TableEnvironment`.

Expand Down

0 comments on commit 079151c

Please sign in to comment.