klion26 commented on a change in pull request #11978:
URL: https://github.com/apache/flink/pull/11978#discussion_r427181000



##########
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)* 表示。

Review comment:
       ```suggestion
   对于记录变更历史的表,Flink 可以追踪这些变化,并且允许查询这张表在某个特定时间点的内容。在 Flink 中,这类表由*时态表函数(Temporal 
Table Function)* 表示。
   ```

##########
File path: docs/dev/table/streaming/temporal_tables.zh.md
##########
@@ -68,9 +67,9 @@ WHERE r.rowtime = (
   AND r2.rowtime <= TIME '10:58');
 {% endhighlight %}
 
-The correlated subquery determines the maximum time for the corresponding 
currency that is lower or equal than the desired time. The outer query lists 
the rates that have a maximum timestamp.
-
-The following table shows the result of such a computation. In our example, 
the update to `Euro` at `10:45` is taken into account, however, the update to 
`Euro` at `11:15` and the new entry of `Pounds` are not considered in the 
table's version at time `10:58`.
+子查询确定对应货币的最大时间小于或等于所需时间。外部查询列出具有最大时间戳的汇率。 
+ 
+下表显示了这种计算的结果。在我们的示例中, `10:58` 时表的版本,考虑了 `10:45` 时`欧元`的更新,但未考虑 `11:15` 
时的`欧元`更新和`英镑`的新值。

Review comment:
       中文中很少有 “时表的版本”这种说法,这里想说的是 “10:45“ 这一时刻对应的表是啥。具体的语言可以再组织一下

##########
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 
表解释为变更日志需要指定主键属性和时间戳属性。主键确定哪些行将被覆盖,时间戳确定行有效的时间。

Review comment:
       ```suggestion
    *时态表*的概念旨在简化此类查询,加快其执行速度,并减少 Flink 的状态使用。*时态表*是 append-only 表上的参数化视图,该视图将 
append-only 表的行解释为表的变更日志,并在特定时间点提供该表的版本。将 append-only 
表解释为变更日志需要指定主键属性和时间戳属性。主键确定哪些行将被覆盖,时间戳确定行有效的时间。
   ```

##########
File path: docs/dev/table/streaming/temporal_tables.zh.md
##########
@@ -216,19 +216,20 @@ tEnv.registerFunction("Rates", rates)                     
                     /
 </div>
 </div>
 
-Line `(1)` creates a `rates` [temporal table 
function](#temporal-table-functions),
-which allows us to use the function `rates` in the [Table 
API](../tableApi.html#joins).
+行 `(1)` 创建了一个 `rates` [时态表函数](#temporal-table-function),
+这使我们可以在[ Table API ](../tableApi.html#joins)中使用 `rates` 函数。
+
+行 `(2)` 在表环境中注册名称为 `Rates` 的函数,这使我们可以在[ SQL ]({{ site.baseurl 
}}/zh/dev/table/sql/queries.html#joins)中使用 `Rates` 函数。
 
-Line `(2)` registers this function under the name `Rates` in our table 
environment,
-which allows us to use the `Rates` function in [SQL]({{ site.baseurl 
}}/dev/table/sql/queries.html#joins).
+<a name="temporal-table"></a>
 
-## Temporal Table
+## 时态表
 
-<span class="label label-danger">Attention</span> This is only supported in 
Blink planner.
+<span class="label label-danger">注意</span> 仅 Blink planner 支持此功能。
 
-In order to access data in temporal table, currently one must define a 
`TableSource` with `LookupableTableSource`. Flink uses the SQL syntax of `FOR 
SYSTEM_TIME AS OF` to query temporal table, which is proposed in SQL:2011.
+为了访问时态表中的数据,当前必须使用 `LookupableTableSource` 定义一个 `TableSource` 。Flink 使用 
SQL:2011 中提出的 `FOR SYSTEM_TIME AS OF` 的 SQL 语法查询时态表。
 
-Assuming that we defined a temporal table called `LatestRates`, we can query 
such a table in the following way:
+假设我们定义了一个时态表 `LatestRates` ,我们可以通过以下方式查询此类表:

Review comment:
       ```suggestion
   假设我们定义了一个时态表 `LatestRates`,我们可以通过以下方式查询此类表:
   ```
   ”查询此类表“ 改成 ”查询此表“?

##########
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:
       这里的翻译(这里的意思是这是一个相对于日元的汇率表,也就是说 日元对日元的 汇率是 1),感觉读起来有一点点拗口,另外 数字/字符 
与中文之间需要有空格,具体可以参考 
[wiki](https://cwiki.apache.org/confluence/display/FLINK/Flink+Translation+Specifications)
   数字和标点符号之间不需要空格,比如 这里的 ”从 `10:45` 到 `11:15` ,“ 需要改成 ”从 `10:45` 到 
`11:15`,“,也就是 5 和 ”,“ 之间不需要空格

##########
File path: docs/dev/table/streaming/temporal_tables.zh.md
##########
@@ -216,19 +216,20 @@ tEnv.registerFunction("Rates", rates)                     
                     /
 </div>
 </div>
 
-Line `(1)` creates a `rates` [temporal table 
function](#temporal-table-functions),
-which allows us to use the function `rates` in the [Table 
API](../tableApi.html#joins).
+行 `(1)` 创建了一个 `rates` [时态表函数](#temporal-table-function),

Review comment:
       可以的话,建议把代码的注释也翻译一下

##########
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)表示.
 
-### Correlate with a changing dimension table
+### 与维表变化相关
 
-On the other hand, some use cases require to join a changing dimension table 
which is an external database table.
+另一方面,某些用例需要连接变化的维表,该表是外部数据库表。
 
-Let's assume that `LatestRates` is a table (e.g. stored in) which is 
materialized with the latest rate. The `LatestRates` is the materialized 
history `RatesHistory`. Then the content of `LatestRates` table at time `10:58` 
will be:
+假设 `LatestRates` 是一个被物化的最新汇率表(例如,存储在其中)。`LatestRates` 是物化的 `RatesHistory` 
历史。那么 `LatestRates` 表在 `10:58` 的内容将是:

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]


Reply via email to