klion26 commented on a change in pull request #11978:
URL: https://github.com/apache/flink/pull/11978#discussion_r428414960
##########
File path: docs/dev/table/streaming/temporal_tables.zh.md
##########
@@ -113,18 +112,20 @@ Euro 119
Pounds 108
{% endhighlight %}
-In Flink, this is represented by a [*Temporal Table*](#temporal-table).
+在Flink中,这由[*时态表*](#temporal-table)表示.
+
+<a name="temporal-table-function"></a>
-Temporal Table Function
+时态表函数
------------------------
-In order to access the data in a temporal table, one must pass a [time
attribute](time_attributes.html) that determines the version of the table that
will be returned.
-Flink uses the SQL syntax of [table functions]({{ site.baseurl
}}/dev/table/functions/udfs.html#table-functions) to provide a way to express
it.
+为了访问时态表中的数据,必须传递一个[时间属性](time_attributes.html),该属性确定将要返回的表的版本。
+ Flink 使用[表函数]({{ site.baseurl
}}/zh/dev/table/functions/udfs.html#table-functions) 的 SQL 语法提供一种表达它的方法。
Review comment:
```suggestion
Flink 使用[表函数]({{ site.baseurl
}}/zh/dev/table/functions/udfs.html#table-functions)的 SQL 语法提供一种表达它的方法。
```
##########
File path: docs/dev/table/streaming/temporal_tables.zh.md
##########
@@ -53,10 +53,9 @@ rowtime currency rate
11:49 Pounds 108
{% endhighlight %}
-`RatesHistory` represents an ever growing append-only table of currency
exchange rates with respect to `Yen` (which has a rate of `1`).
-For example, the exchange rate for the period from `09:00` to `10:45` of
`Euro` to `Yen` was `114`. From `10:45` to `11:15` it was `116`.
+`RatesHistory` 表示一个关于日元且不断增长的货币汇率 append-only 表(汇率为1)。例如,`欧元`兑`日元`从 `09:00` 到
`10:45` 的汇率为 `114`。从 `10:45` 到 `11:15`,汇率为 `116`。
Review comment:
“`RatesHistory` 表示一个关于日元且不断增长的货币汇率 append-only 表(汇率为1)”
这里的翻译意思了解,但是感觉不太通顺。
这里的意思是说这个表是相对于日元的汇率表,而且表是 append-only 的,日元对日元的汇率是 1.
##########
File path: docs/dev/table/streaming/temporal_tables.zh.md
##########
@@ -22,23 +22,23 @@ specific language governing permissions and limitations
under the License.
-->
-Temporal Tables represent a concept of a (parameterized) view on a changing
table that returns the content of a table at a specific point in time.
+时态表(Temporal Table)表示基于记录变更历史的表上(参数化)视图的概念,该视图返回表在某个特定时间点的内容。
Review comment:
`时态表(Temporal Table)表示基于记录变更历史的表上(参数化)视图的概念` 这句话读起来有点拗口,有办法优化一下吗?
##########
File path: docs/dev/table/streaming/temporal_tables.zh.md
##########
@@ -22,23 +22,23 @@ specific language governing permissions and limitations
under the License.
-->
-Temporal Tables represent a concept of a (parameterized) view on a changing
table that returns the content of a table at a specific point in time.
+时态表(Temporal Table)表示基于记录变更历史的表上(参数化)视图的概念,该视图返回表在某个特定时间点的内容。
-The changing table can either be a changing history table which tracks the
changes (e.g. database changelogs) or a changing dimension table which
materializes the changes (e.g. database tables).
+变更表可以是跟踪变化的历史记录表(例如数据库变更日志),也可以是有具体更改的维表(例如数据库表)。
-For the changing history table, Flink can keep track of the changes and allows
for accessing the content of the table at a certain point in time within a
query. In Flink, this kind of table is represented by a *Temporal Table
Function*.
+对于记录变更历史的表,Flink 可以追踪这些变化,并且允许查询这张表在某个特定时间点的内容。在 Flink 中,这类表由*时态表函数(Temporal
Table Function)*表示。
-For the changing dimension table, Flink allows for accessing the content of
the table at processing time within a query. In Flink, this kind of table is
represented by a *Temporal Table*.
+对于变化的维表,Flink 允许查询这张表在处理时的内容,在 Flink 中,此类表由*时态表(Temporal Table)*表示。
* This will be replaced by the TOC
{:toc}
-Motivation
+设计初衷
----------
-### Correlate with a changing history table
+### 与记录变更历史的表相关
-Let's assume that we have the following table `RatesHistory`.
+假设我们有下表 `RatesHistory`。
Review comment:
个人观点:这里翻译成 ”假设我们有表 `RateHistory` 如下所示“
会好一些吗?现在的翻译感觉句子没有说完一样的。当然有其他更好的翻译更好。
##########
File path: docs/dev/table/streaming/temporal_tables.zh.md
##########
@@ -80,17 +79,17 @@ rowtime currency rate
10:45 Euro 116
{% endhighlight %}
-The concept of *Temporal Tables* aims to simplify such queries, speed up their
execution, and reduce Flink's state usage. A *Temporal Table* is a
parameterized view on an append-only table that interprets the rows of the
append-only table as the changelog of a table and provides the version of that
table at a specific point in time. Interpreting the append-only table as a
changelog requires the specification of a primary key attribute and a timestamp
attribute. The primary key determines which rows are overwritten and the
timestamp determines the time during which a row is valid.
+ *时态表*的概念旨在简化此类查询,加快其执行速度,并减少 Flink 的状态使用。*时态表*是 append-only 表上的参数化视图,该视图将
append-only 表的行解释为表的变更日志,并在特定时间点提供该表的版本。将 append-only
表解释为变更日志需要指定主键属性和时间戳属性。主键确定哪些行将被覆盖,时间戳确定行有效的时间。
-In the above example `currency` would be a primary key for `RatesHistory`
table and `rowtime` would be the timestamp attribute.
+在上面的示例中,`currency` 是 `RatesHistory` 表的主键,而 `rowtime` 是时间戳属性。
-In Flink, this is represented by a [*Temporal Table
Function*](#temporal-table-function).
+在Flink中, 这由[*时态表函数*](#temporal-table-function)表示.
Review comment:
```suggestion
在 Flink 中, 这由[*时态表函数*](#temporal-table-function)表示.
```
----------------------------------------------------------------
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]