libenchao commented on a change in pull request #11423:
[Flink-16083][chinese-translation]Translate "Dynamic Table" page of "…
URL: https://github.com/apache/flink/pull/11423#discussion_r393430860
##########
File path: docs/dev/table/streaming/dynamic_tables.zh.md
##########
@@ -159,31 +159,31 @@ FROM (
);
{% endhighlight %}
-The [Query Configuration](query_configuration.html) page discusses parameters
to control the execution of continuous queries. Some parameters can be used to
trade the size of maintained state for result accuracy.
+[查询配置](query_configuration.html)章节讨论了控制连续查询执行的参数。一些参数可以用来更改维持状态的大小以获得结果的准确性。
-Table to Stream Conversion
+表到流的转换
--------------------------
-A dynamic table can be continuously modified by `INSERT`, `UPDATE`, and
`DELETE` changes just like a regular database table. It might be a table with a
single row, which is constantly updated, an insert-only table without `UPDATE`
and `DELETE` modifications, or anything in between.
+动态表可以像普通数据库表一样通过 `INSERT`、`UPDATE` 和 `DELETE` 来不断修改。它可能是一个只有一行、不断更新的表,也可能是一个
insert-only 的表,没有 `UPDATE` 和 `DELETE` 修改,或者介于两者之间的其他修改。
-When converting a dynamic table into a stream or writing it to an external
system, these changes need to be encoded. Flink's Table API and SQL support
three ways to encode the changes of a dynamic table:
+在将动态表转换为流或将其写入外部系统时,需要对这些更改进行编码。Flink的 Table API 和 SQL 支持三种方式来编码一个动态表的变化:
-* **Append-only stream:** A dynamic table that is only modified by `INSERT`
changes can be converted into a stream by emitting the inserted rows.
+* **Append-only 流:** 仅通过 `INSERT` 操作修改的动态表可以通过输出插入的行转换为流。
-* **Retract stream:** A retract stream is a stream with two types of messages,
*add messages* and *retract messages*. A dynamic table is converted into an
retract stream by encoding an `INSERT` change as add message, a `DELETE` change
as retract message, and an `UPDATE` change as a retract message for the updated
(previous) row and an add message for the updating (new) row. The following
figure visualizes the conversion of a dynamic table into a retract stream.
+* **Retract 流:** retract 流包含两种类型的 message: *add messages* 和 *retract messages*
。通过将`INSERT` 操作编码为 add message、将 `DELETE` 操作编码为 retract message、将 `UPDATE`
操作编码为更新(先前)行的 retract message 和更新(新)行的 add message,将动态表转换为 retract
流。下图显示了将动态表转换为 retract 流的过程。
<center>
<img alt="Dynamic tables" src="{{ site.baseurl
}}/fig/table-streaming/undo-redo-mode.png" width="85%">
</center>
<br><br>
-* **Upsert stream:** An upsert stream is a stream with two types of messages,
*upsert messages* and *delete messages*. A dynamic table that is converted into
an upsert stream requires a (possibly composite) unique key. A dynamic table
with unique key is converted into a stream by encoding `INSERT` and `UPDATE`
changes as upsert messages and `DELETE` changes as delete messages. The stream
consuming operator needs to be aware of the unique key attribute in order to
apply messages correctly. The main difference to a retract stream is that
`UPDATE` changes are encoded with a single message and hence more efficient.
The following figure visualizes the conversion of a dynamic table into an
upsert stream.
+* **Upsert 流:** upsert 流包含两种类型的 message: *upsert messages* 和*delete
messages*。转换为 upsert 流的动态表需要(可能是组合的)惟一键。通过将 `INSERT` 和 `UPDATE` 操作编码为 upsert
message,将 `DELETE` 操作编码为 delete message
,将具有唯一键的动态表转换为流。消费流的算子需要知道唯一键的属性,以便正确地应用 message。与 retract 流的主要区别在于 `UPDATE`
操作是用单个 message 编码的,因此效率更高。下图显示了将动态表转换为 upsert 流的过程。
Review comment:
惟一 -> 唯一
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services