authuir commented on a change in pull request #12420:
URL: https://github.com/apache/flink/pull/12420#discussion_r436320945



##########
File path: docs/dev/table/streaming/joins.zh.md
##########
@@ -189,50 +183,42 @@ val result = orders
 </div>
 </div>
 
-**Note**: State retention defined in a [query 
configuration](query_configuration.html) is not yet implemented for temporal 
joins.
-This means that the required state to compute the query result might grow 
infinitely depending on the number of distinct primary keys for the history 
table.
+**注意**: 临时 Join中的 State 保留(在 [查询配置](query_configuration.html) 
中定义)还未实现。这意味着计算的查询结果所需的状态可能会无限增长,具体数量取决于历史记录表的不重复主键个数。
 
-### Processing-time Temporal Joins
+### 基于 Processing-time 临时 Join
 
-With a processing-time time attribute, it is impossible to pass _past_ time 
attributes as an argument to the temporal table function.
-By definition, it is always the current timestamp. Thus, invocations of a 
processing-time temporal table function will always return the latest known 
versions of the underlying table
-and any updates in the underlying history table will also immediately 
overwrite the current values.
+如果将 processing-time 作为时间属性,将无法将 _past_ 时间属性作为参数传递给临时表函数。
+根据定义,processing-time 总会是当前时间戳。因此,基于 processing-time 
的临时表函数将始终返回基础表的最新已知版本,时态表函数的调用将始终返回基础表的最新已知版本,并且基础历史表中的任何更新也将立即覆盖当前值。
 
-Only the latest versions (with respect to the defined primary key) of the 
build side records are kept in the state.
-Updates of the build side will have no effect on previously emitted join 
results.
+只有最新版本的构建侧记录(是否最新由所定义的主键所决定)会被保存在 state 中。
+构建侧的更新不会对之前 Join 的结果产生影响。
 
-One can think about a processing-time temporal join as a simple `HashMap<K, 
V>` that stores all of the records from the build side.
-When a new record from the build side has the same key as some previous 
record, the old value is just simply overwritten.
-Every record from the probe side is always evaluated against the most 
recent/current state of the `HashMap`.
+可以将 processing-time 的临时 Join 视作简单的哈希Map `HashMap <K,V>`,HashMap 中存储来自构建侧的所有记录。
+当来自构建侧的新插入的记录与旧值具有相同的 Key 时,旧值仅会被覆盖。
+探针侧的每条记录将总会根据 `HashMap` 的最新/当前状态来计算。
 
-### Event-time Temporal Joins
+### 基于 Event-time 临时 Join
 
-With an event-time time attribute (i.e., a rowtime attribute), it is possible 
to pass _past_ time attributes to the temporal table function.
-This allows for joining the two tables at a common point in time.
+将 event-time 作为时间属性时,可将 _past_ 时间属性作为参数传递给临时表函数。
+这允许对两个表中在相同时间点的记录执行 Join 操作。
 
-Compared to processing-time temporal joins, the temporal table does not only 
keep the latest version (with respect to the defined primary key) of the build 
side records in the state
-but stores all versions (identified by time) since the last watermark.
+与基于 processing-time 的临时 Join 相比,临时表不仅将构建侧记录的最新版本(是否最新由所定义的主键所决定)保存在 state 
中,同时也会存储自上一个水印以来的所有版本(按时间区分)。
 
-For example, an incoming row with an event-time timestamp of `12:30:00` that 
is appended to the probe side table
-is joined with the version of the build side table at time `12:30:00` 
according to the [concept of temporal tables](temporal_tables.html).
-Thus, the incoming row is only joined with rows that have a timestamp lower or 
equal to `12:30:00` with
-applied updates according to the primary key until this point in time.
+例如,在探针侧表新插入一条 event-time 时间为 `12:30:00` 的记录,它将和构建侧表时间点为 `12:30:00` 
的版本根据[临时表的概念](temporal_tables.html)进行 Join 运算。
+因此,新插入的记录仅与时间戳小于等于 `12:30:00` 的记录进行 Join 计算(由主键决定哪些时间点的数据将参与计算)。
 
-By definition of event time, [watermarks]({{ site.baseurl 
}}/dev/event_time.html) allow the join operation to move
-forward in time and discard versions of the build table that are no longer 
necessary because no incoming row with
-lower or equal timestamp is expected.
+通过定义事件时间(event time),[watermarks]({{ site.baseurl }}/dev/event_time.html) 允许 
Join 运算不断向前滚动,丢弃不再需要的构建侧快照。因为不再需要时间戳更低或相等的记录。

Review comment:
       Fixed.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to