leonardBang commented on a change in pull request #15753:
URL: https://github.com/apache/flink/pull/15753#discussion_r621757583



##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -23,29 +23,29 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## Overview
+## 概述
 
-Flink provides rich data types for Date and Time, including `DATE`, `TIME`, 
`TIMESTAMP`, `TIMESTAMP_LTZ`, `INTERVAL YEAR TO MONTH`, `INTERVAL DAY TO 
SECOND` (please see [Date and Time]({{< ref "docs/dev/table/types" 
>}}#date-and-time) for detailed information).
-Flink supports setting time zone in session level (please see 
[table.local-time-zone]({{< ref 
"docs/dev/table/config">}}#table-local-time-zone) for detailed information).
-These timestamp data types and time zone support of Flink make it easy to 
process business data across time zones.
+Flink 为日期和时间提供了丰富的数据类型, 包括 `DATE`, `TIME`, `TIMESTAMP`, `TIMESTAMP_LTZ`, 
`INTERVAL YEAR TO MONTH`, `INTERVAL DAY TO SECOND` (更多详情请参考 [Date and Time]({{< 
ref "docs/dev/table/types" >}}#date-and-time))。
+Flink 支持在 session (会话)级别设置时区(更多详情请参考 [table.local-time-zone]({{< ref 
"docs/dev/table/config">}}#table-local-time-zone))。
+Flink 对多种时间类型和时区的支持使得跨时区的数据处理变得非常容易。
 
 ## TIMESTAMP vs TIMESTAMP_LTZ
 
-### TIMESTAMP type
- - `TIMESTAMP(p)` is an abbreviation for `TIMESTAMP(p) WITHOUT TIME ZONE`, the 
precision `p` supports range is from 0 to 9, 6 by default.
- - `TIMESTAMP` describes a timestamp represents year, month, day, hour, 
minute, second and fractional seconds.
- - `TIMESTAMP` can be specified from a string literal, e.g.
+### TIMESTAMP 类型
+ - `TIMESTAMP(p)` 是 `TIMESTAMP(p) WITHOUT TIME ZONE` 的简写, 精度 `p` 支持的范围是0-9, 
默认是6。
+ - `TIMESTAMP` 用于描述年, 月, 日, 小时, 分钟, 秒 和 小数秒对应的时间戳。
+ - `TIMESTAMP` 可以通过一个字符串来指定,例如:
  ```sql
 Flink SQL> SELECT TIMESTAMP '1970-01-01 00:00:04.001';
 +-------------------------+
 | 1970-01-01 00:00:04.001 |
 +-------------------------+
 ```
 
-### TIMESTAMP_LTZ type
- - `TIMESTAMP_LTZ(p)` is an abbreviation for `TIMESTAMP(p) WITH LOCAL TIME 
ZONE`, the precision `p` supports range is from 0 to 9, 6 by default.
- - `TIMESTAMP_LTZ` describes an absolute time point on the time-line, it 
stores a long value representing epoch-milliseconds and an int representing 
nanosecond-of-millisecond. The epoch time is measured from the standard Java 
epoch of `1970-01-01T00:00:00Z`. Every datum of `TIMESTAMP_LTZ` type is 
interpreted in the local time zone configured in the current session for 
computation and visualization.
- - `TIMESTAMP_LTZ` has no literal representation and thus can not specify from 
literal, it can derives from a long epoch time(e.g. The long time produced by 
Java `System.currentTimeMillis()`)
+### TIMESTAMP_LTZ 类型
+ - `TIMESTAMP_LTZ(p)` 是 `TIMESTAMP(p) WITH LOCAL TIME ZONE` 的简写, 精度 `p` 
支持的范围是0-9, 默认是6。
+ - `TIMESTAMP_LTZ` 用于描述时间线上的绝对时间点, 使用 long 保存从 epoch 至今的毫秒数, 使用int保存毫秒中的纳秒数。 
epoch 时间是从 java 的标准 epoch 时间 `1970-01-01T00:00:00Z` 开始计算。 在计算和可视化时, 每个 
`TIMESTAMP_LTZ` 类型的数据都是使用的 session (会话)中配置的时区。
+ - `TIMESTAMP_LTZ` 没有字符串表达形式因此无法通过字符串来指定, 可以通过一个 long 类型的 epoch 时间来转化(例如: 
通过Java来产生一个long类型epoch时间 `System.currentTimeMillis()`)

Review comment:
       ```suggestion
    - `TIMESTAMP_LTZ` 没有字符串表达形式因此无法通过字符串来指定, 可以通过一个 long 类型的 epoch 时间来转化(例如: 通过 
Java 来产生一个 long 类型的 epoch 时间 `System.currentTimeMillis()`)
   ```

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -539,35 +538,34 @@ Returns the different window start, window end and window 
rowtime compared to ca
 
+-------------------------+-------------------------+-------------------------+------+-----------+
 ```
 
-## Daylight Saving Time Support
-Flink SQL supports defining time attributes on TIMESTAMP_LTZ column, base on 
this, Flink SQL gracefully uses TIMESTAMP and TIMESTAMP_LTZ type in window 
processing to support the Daylight Saving Time.
+## 夏令时支持
+Flink SQL支持在 `TIMESTAMP_LTZ`列上定义时间属性, 基于这一特征,Flink SQL 在窗口中使用 `TIMESTAMP` 和 
`TIMESTAMP_LTZ` 类型优雅地支持了夏令时。
    
-  
-Flink use timestamp literal to split the window and assigns window to data 
according to the epoch time of the each row. It means Flink uses `TIMESTAMP` 
type for window start and window end (e.g. `TUMBLE_START` and `TUMBLE_END`), 
uses `TIMESTAMP_LTZ` for window time attribute (e.g. `TUMBLE_PROCTIME`, 
`TUMBLE_ROWTIME`).
-Given a example of tumble window, the DaylightTime in Los_Angele starts at 
time 2021-03-14 02:00:00:
+Flink 使用时间的字符格式来分割窗口并通过 row 的 epoch 时间来分配窗口。 这意味着 Flink 窗口开始时间和窗口结束时间使用的是 
`TIMESTAMP` 类型(例如: `TUMBLE_START` 和 `TUMBLE_END`), 将 `TIMESTAMP_LTZ` 
类型用于窗口的时间属性(例如: `TUMBLE_PROCTIME`, `TUMBLE_ROWTIME`)。
+给定一个tumble window示例, 在Los_Angele时区下夏令时从 `2021-03-14 02:00:00` 开始:
 ```
 long epoch1 = 1615708800000L; // 2021-03-14 00:00:00
 long epoch2 = 1615712400000L; // 2021-03-14 01:00:00
 long epoch3 = 1615716000000L; // 2021-03-14 03:00:00, skip one hour 
(2021-03-14 02:00:00)
 long epoch4 = 1615719600000L; // 2021-03-14 04:00:00 
 ```
-The tumble window [2021-03-14 00:00:00,  2021-03-14 00:04:00] will collect 3 
hours' data in Los_angele time zone, but it collect 4 hours' data in other 
non-DST time zones, what user to do is only define time attribute on 
TIMESTAMP_LTZ column.
+在 Los_angele 时区下, tumble window [2021-03-14 00:00:00,  2021-03-14 00:04:00] 
将会收集3个小时的数据, 在其他非 DST 的时区下将会收集4个小时的数据,用户只需要在 `TIMESTAMP_LTZ` 列上声明时间属性即可。
 
-All windows in Flink like Hop window, Session window, Cumulative window follow 
this way, and all operations in Flink SQL support TIMESTAMP_LTZ well, thus 
Flink gracefully supports the Daylight Saving Time zone.   
+Flink 的所有窗口(如 Hop window, Session window, Cumulative window)都会遵循这种方式, Flink 
SQL 中的所有操作都很好的支持了 `TIMESTAMP_LTZ` ,因此Flink可以非常优雅的支持夏令时。  

Review comment:
       ```suggestion
   Flink 的所有窗口(如 Hop window, Session window, Cumulative window)都会遵循这种方式, Flink 
SQL 中的所有操作都很好地支持了 `TIMESTAMP_LTZ` 类型,因此 Flink 可以非常优雅地支持夏令时。  
   ```

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -539,35 +538,34 @@ Returns the different window start, window end and window 
rowtime compared to ca
 
+-------------------------+-------------------------+-------------------------+------+-----------+
 ```
 
-## Daylight Saving Time Support
-Flink SQL supports defining time attributes on TIMESTAMP_LTZ column, base on 
this, Flink SQL gracefully uses TIMESTAMP and TIMESTAMP_LTZ type in window 
processing to support the Daylight Saving Time.
+## 夏令时支持
+Flink SQL支持在 `TIMESTAMP_LTZ`列上定义时间属性, 基于这一特征,Flink SQL 在窗口中使用 `TIMESTAMP` 和 
`TIMESTAMP_LTZ` 类型优雅地支持了夏令时。
    
-  
-Flink use timestamp literal to split the window and assigns window to data 
according to the epoch time of the each row. It means Flink uses `TIMESTAMP` 
type for window start and window end (e.g. `TUMBLE_START` and `TUMBLE_END`), 
uses `TIMESTAMP_LTZ` for window time attribute (e.g. `TUMBLE_PROCTIME`, 
`TUMBLE_ROWTIME`).
-Given a example of tumble window, the DaylightTime in Los_Angele starts at 
time 2021-03-14 02:00:00:
+Flink 使用时间的字符格式来分割窗口并通过 row 的 epoch 时间来分配窗口。 这意味着 Flink 窗口开始时间和窗口结束时间使用的是 
`TIMESTAMP` 类型(例如: `TUMBLE_START` 和 `TUMBLE_END`), 将 `TIMESTAMP_LTZ` 
类型用于窗口的时间属性(例如: `TUMBLE_PROCTIME`, `TUMBLE_ROWTIME`)。

Review comment:
       ```suggestion
   Flink 使用时间戳的字符格式来分割窗口并通过每条记录对应的 epoch 时间来分配窗口。 这意味着 Flink 窗口开始时间和窗口结束时间使用的是 
`TIMESTAMP` 类型(例如: `TUMBLE_START` 和 `TUMBLE_END`),窗口的时间属性使用的是  `TIMESTAMP_LTZ` 
类型(例如: `TUMBLE_PROCTIME`, `TUMBLE_ROWTIME`)。
   ```

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -539,35 +538,34 @@ Returns the different window start, window end and window 
rowtime compared to ca
 
+-------------------------+-------------------------+-------------------------+------+-----------+
 ```
 
-## Daylight Saving Time Support
-Flink SQL supports defining time attributes on TIMESTAMP_LTZ column, base on 
this, Flink SQL gracefully uses TIMESTAMP and TIMESTAMP_LTZ type in window 
processing to support the Daylight Saving Time.
+## 夏令时支持
+Flink SQL支持在 `TIMESTAMP_LTZ`列上定义时间属性, 基于这一特征,Flink SQL 在窗口中使用 `TIMESTAMP` 和 
`TIMESTAMP_LTZ` 类型优雅地支持了夏令时。
    
-  
-Flink use timestamp literal to split the window and assigns window to data 
according to the epoch time of the each row. It means Flink uses `TIMESTAMP` 
type for window start and window end (e.g. `TUMBLE_START` and `TUMBLE_END`), 
uses `TIMESTAMP_LTZ` for window time attribute (e.g. `TUMBLE_PROCTIME`, 
`TUMBLE_ROWTIME`).
-Given a example of tumble window, the DaylightTime in Los_Angele starts at 
time 2021-03-14 02:00:00:
+Flink 使用时间的字符格式来分割窗口并通过 row 的 epoch 时间来分配窗口。 这意味着 Flink 窗口开始时间和窗口结束时间使用的是 
`TIMESTAMP` 类型(例如: `TUMBLE_START` 和 `TUMBLE_END`), 将 `TIMESTAMP_LTZ` 
类型用于窗口的时间属性(例如: `TUMBLE_PROCTIME`, `TUMBLE_ROWTIME`)。
+给定一个tumble window示例, 在Los_Angele时区下夏令时从 `2021-03-14 02:00:00` 开始:
 ```
 long epoch1 = 1615708800000L; // 2021-03-14 00:00:00
 long epoch2 = 1615712400000L; // 2021-03-14 01:00:00
 long epoch3 = 1615716000000L; // 2021-03-14 03:00:00, skip one hour 
(2021-03-14 02:00:00)
 long epoch4 = 1615719600000L; // 2021-03-14 04:00:00 
 ```
-The tumble window [2021-03-14 00:00:00,  2021-03-14 00:04:00] will collect 3 
hours' data in Los_angele time zone, but it collect 4 hours' data in other 
non-DST time zones, what user to do is only define time attribute on 
TIMESTAMP_LTZ column.
+在 Los_angele 时区下, tumble window [2021-03-14 00:00:00,  2021-03-14 00:04:00] 
将会收集3个小时的数据, 在其他非 DST 的时区下将会收集4个小时的数据,用户只需要在 `TIMESTAMP_LTZ` 列上声明时间属性即可。

Review comment:
       ```suggestion
   在 Los_angele 时区下, tumble window [2021-03-14 00:00:00,  2021-03-14 00:04:00] 
将会收集3个小时的数据, 在其他非夏令时的时区下将会收集4个小时的数据,用户只需要在 `TIMESTAMP_LTZ` 列上声明时间属性即可。
   ```

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -528,7 +527,7 @@ Flink SQL> SET table.local-time-zone=Asia/Shanghai;
 Flink SQL> SELECT * FROM MyView5;
 ```
 
-Returns the different window start, window end and window rowtime compared to 
calculation in UTC timezone.   
+返回和 UTC 时区下计算时的不同的窗口开始时间, 窗口结束时间和窗口的 rowtime 。

Review comment:
       ditto

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -539,35 +538,34 @@ Returns the different window start, window end and window 
rowtime compared to ca
 
+-------------------------+-------------------------+-------------------------+------+-----------+
 ```
 
-## Daylight Saving Time Support
-Flink SQL supports defining time attributes on TIMESTAMP_LTZ column, base on 
this, Flink SQL gracefully uses TIMESTAMP and TIMESTAMP_LTZ type in window 
processing to support the Daylight Saving Time.
+## 夏令时支持
+Flink SQL支持在 `TIMESTAMP_LTZ`列上定义时间属性, 基于这一特征,Flink SQL 在窗口中使用 `TIMESTAMP` 和 
`TIMESTAMP_LTZ` 类型优雅地支持了夏令时。
    
-  
-Flink use timestamp literal to split the window and assigns window to data 
according to the epoch time of the each row. It means Flink uses `TIMESTAMP` 
type for window start and window end (e.g. `TUMBLE_START` and `TUMBLE_END`), 
uses `TIMESTAMP_LTZ` for window time attribute (e.g. `TUMBLE_PROCTIME`, 
`TUMBLE_ROWTIME`).
-Given a example of tumble window, the DaylightTime in Los_Angele starts at 
time 2021-03-14 02:00:00:
+Flink 使用时间的字符格式来分割窗口并通过 row 的 epoch 时间来分配窗口。 这意味着 Flink 窗口开始时间和窗口结束时间使用的是 
`TIMESTAMP` 类型(例如: `TUMBLE_START` 和 `TUMBLE_END`), 将 `TIMESTAMP_LTZ` 
类型用于窗口的时间属性(例如: `TUMBLE_PROCTIME`, `TUMBLE_ROWTIME`)。
+给定一个tumble window示例, 在Los_Angele时区下夏令时从 `2021-03-14 02:00:00` 开始:
 ```
 long epoch1 = 1615708800000L; // 2021-03-14 00:00:00
 long epoch2 = 1615712400000L; // 2021-03-14 01:00:00
 long epoch3 = 1615716000000L; // 2021-03-14 03:00:00, skip one hour 
(2021-03-14 02:00:00)

Review comment:
       ```suggestion
   long epoch3 = 1615716000000L; // 2021-03-14 03:00:00,  手表往前拨一小时,跳过 
(2021-03-14 02:00:00)
   ```

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -457,8 +456,8 @@ Returns the same window start, window end and window 
rowtime compared to calcula
 
+-------------------------+-------------------------+-------------------------+------+-----------+
 ```
 
-#### Event Time Attribute on TIMESTAMP_LTZ
-If the timestamp data in the source is represented as a epoch time, usually a 
long value, e.g. `1618989564564`, it's recommended to define event time 
attribute as a `TIMESTAMP_LTZ` column.  
+#### TIMESTAMP_LTZ 上的事件时间属性
+如果 source 中的时间为一个 epoch 时间, 通常是一个 long 值, 例如: `1618989564564` ,推荐将事件时间属性定义在 
`TIMESTAMP_LTZ` 列上。

Review comment:
       ```suggestion
   如果源数据中的时间为一个 epoch 时间, 通常是一个 long 值, 例如: `1618989564564` ,推荐将事件时间属性定义在 
`TIMESTAMP_LTZ` 列上。
   ```

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -539,35 +538,34 @@ Returns the different window start, window end and window 
rowtime compared to ca
 
+-------------------------+-------------------------+-------------------------+------+-----------+
 ```
 
-## Daylight Saving Time Support
-Flink SQL supports defining time attributes on TIMESTAMP_LTZ column, base on 
this, Flink SQL gracefully uses TIMESTAMP and TIMESTAMP_LTZ type in window 
processing to support the Daylight Saving Time.
+## 夏令时支持
+Flink SQL支持在 `TIMESTAMP_LTZ`列上定义时间属性, 基于这一特征,Flink SQL 在窗口中使用 `TIMESTAMP` 和 
`TIMESTAMP_LTZ` 类型优雅地支持了夏令时。
    
-  
-Flink use timestamp literal to split the window and assigns window to data 
according to the epoch time of the each row. It means Flink uses `TIMESTAMP` 
type for window start and window end (e.g. `TUMBLE_START` and `TUMBLE_END`), 
uses `TIMESTAMP_LTZ` for window time attribute (e.g. `TUMBLE_PROCTIME`, 
`TUMBLE_ROWTIME`).
-Given a example of tumble window, the DaylightTime in Los_Angele starts at 
time 2021-03-14 02:00:00:
+Flink 使用时间的字符格式来分割窗口并通过 row 的 epoch 时间来分配窗口。 这意味着 Flink 窗口开始时间和窗口结束时间使用的是 
`TIMESTAMP` 类型(例如: `TUMBLE_START` 和 `TUMBLE_END`), 将 `TIMESTAMP_LTZ` 
类型用于窗口的时间属性(例如: `TUMBLE_PROCTIME`, `TUMBLE_ROWTIME`)。
+给定一个tumble window示例, 在Los_Angele时区下夏令时从 `2021-03-14 02:00:00` 开始:
 ```
 long epoch1 = 1615708800000L; // 2021-03-14 00:00:00
 long epoch2 = 1615712400000L; // 2021-03-14 01:00:00
 long epoch3 = 1615716000000L; // 2021-03-14 03:00:00, skip one hour 
(2021-03-14 02:00:00)
 long epoch4 = 1615719600000L; // 2021-03-14 04:00:00 
 ```
-The tumble window [2021-03-14 00:00:00,  2021-03-14 00:04:00] will collect 3 
hours' data in Los_angele time zone, but it collect 4 hours' data in other 
non-DST time zones, what user to do is only define time attribute on 
TIMESTAMP_LTZ column.
+在 Los_angele 时区下, tumble window [2021-03-14 00:00:00,  2021-03-14 00:04:00] 
将会收集3个小时的数据, 在其他非 DST 的时区下将会收集4个小时的数据,用户只需要在 `TIMESTAMP_LTZ` 列上声明时间属性即可。
 
-All windows in Flink like Hop window, Session window, Cumulative window follow 
this way, and all operations in Flink SQL support TIMESTAMP_LTZ well, thus 
Flink gracefully supports the Daylight Saving Time zone.   
+Flink 的所有窗口(如 Hop window, Session window, Cumulative window)都会遵循这种方式, Flink 
SQL 中的所有操作都很好的支持了 `TIMESTAMP_LTZ` ,因此Flink可以非常优雅的支持夏令时。  
 
 
-## Difference between Batch and Streaming Mode
-The following time functions:
+## Batch模式和Streaming模式的区别

Review comment:
       ```suggestion
   ## Batch 模式和 Streaming 模式的区别
   ```

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -356,7 +355,7 @@ Flink SQL> SET table.local-time-zone=Asia/Shanghai;
 Flink SQL> SELECT * FROM MyView3;
 ```
 
-Returns the different window start, window end and window proctime compared to 
calculation in UTC timezone.
+返回和 UTC 时区计算下不同的窗口开始时间, 窗口结束时间和窗口处理时间。

Review comment:
       ```suggestion
   相比在 UTC 时区下的计算结果,在 Asia/Shanghai 时区下计算的窗口开始时间, 窗口结束时间和窗口处理时间是不同的。
   ```
   我们把相似的这几句意译一下,更通顺点,你觉得怎么样?

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -446,7 +445,7 @@ Flink SQL> SET table.local-time-zone=Asia/Shanghai;
 Flink SQL> SELECT * FROM MyView4;
 ```
 
-Returns the same window start, window end and window rowtime compared to 
calculation in UTC timezone.               
+返回和在 UTC 时区下计算时相同的窗口开始时间, 窗口结束时间和窗口的 rowtime 。

Review comment:
       ditto

##########
File path: docs/content.zh/docs/dev/table/concepts/timezone.md
##########
@@ -539,35 +538,34 @@ Returns the different window start, window end and window 
rowtime compared to ca
 
+-------------------------+-------------------------+-------------------------+------+-----------+
 ```
 
-## Daylight Saving Time Support
-Flink SQL supports defining time attributes on TIMESTAMP_LTZ column, base on 
this, Flink SQL gracefully uses TIMESTAMP and TIMESTAMP_LTZ type in window 
processing to support the Daylight Saving Time.
+## 夏令时支持
+Flink SQL支持在 `TIMESTAMP_LTZ`列上定义时间属性, 基于这一特征,Flink SQL 在窗口中使用 `TIMESTAMP` 和 
`TIMESTAMP_LTZ` 类型优雅地支持了夏令时。
    
-  
-Flink use timestamp literal to split the window and assigns window to data 
according to the epoch time of the each row. It means Flink uses `TIMESTAMP` 
type for window start and window end (e.g. `TUMBLE_START` and `TUMBLE_END`), 
uses `TIMESTAMP_LTZ` for window time attribute (e.g. `TUMBLE_PROCTIME`, 
`TUMBLE_ROWTIME`).
-Given a example of tumble window, the DaylightTime in Los_Angele starts at 
time 2021-03-14 02:00:00:
+Flink 使用时间的字符格式来分割窗口并通过 row 的 epoch 时间来分配窗口。 这意味着 Flink 窗口开始时间和窗口结束时间使用的是 
`TIMESTAMP` 类型(例如: `TUMBLE_START` 和 `TUMBLE_END`), 将 `TIMESTAMP_LTZ` 
类型用于窗口的时间属性(例如: `TUMBLE_PROCTIME`, `TUMBLE_ROWTIME`)。
+给定一个tumble window示例, 在Los_Angele时区下夏令时从 `2021-03-14 02:00:00` 开始:

Review comment:
       ```suggestion
   给定一个 tumble window 示例, 在 Los_Angele 时区下夏令时从 `2021-03-14 02:00:00` 开始:
   ```




-- 
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