wuchong commented on a change in pull request #10738: 
[FLINK-15385][table][docs] Translate SQL section of Table API into Chinese
URL: https://github.com/apache/flink/pull/10738#discussion_r362364060
 
 

 ##########
 File path: docs/dev/table/sql/create.zh.md
 ##########
 @@ -141,44 +141,44 @@ CREATE TABLE [catalog_name.][db_name.]table_name
 
 {% endhighlight %}
 
-Creates a table with the given name. If a table with the same name already 
exists in the catalog, an exception is thrown.
+根据给定的表属性创建表。若数据库中已存在同名表会抛出异常。
 
 **COMPUTED COLUMN**
 
-A computed column is a virtual column that is generated using the syntax  
"`column_name AS computed_column_expression`". It is generated from a non-query 
expression that uses other columns in the same table and is not physically 
stored within the table. For example, a computed column could be defined as 
`cost AS price * quantity`. The expression may contain any combination of 
physical column, constant, function, or variable. The expression cannot contain 
a subquery.
+计算列是一个使用 “`column_name AS computed_column_expression`” 
语法生成的虚拟列。它由使用同一表中其他列的非查询表达式生成,并且不会在表中进行物理存储。例如,一个计算列可以使用 `cost AS price * 
quantity` 进行定义,这个表达式可以包含物理列、常量、函数或变量的任意组合,但这个表达式不能存在任何子查询。
 
-Computed columns are commonly used in Flink for defining [time attributes]({{ 
site.baseurl}}/dev/table/streaming/time_attributes.html) in CREATE TABLE 
statements.
-A [processing time attribute]({{ 
site.baseurl}}/dev/table/streaming/time_attributes.html#processing-time) can be 
defined easily via `proc AS PROCTIME()` using the system `PROCTIME()` function.
-On the other hand, computed column can be used to derive event time column 
because an event time column may need to be derived from existing fields, e.g. 
the original field is not `TIMESTAMP(3)` type or is nested in a JSON string.
+在 Flink 中计算列一般用于为 CREATE TABLE 语句定义 [时间属性]({{ 
site.baseurl}}/zh/dev/table/streaming/time_attributes.html)。
+[处理时间属性]({{ 
site.baseurl}}/zh/dev/table/streaming/time_attributes.html#processing-time) 
可以简单地通过使用了系统函数 `PROCTIME()` 的 `proc AS PROCTIME()` 语句进行定义。
+另一方面,由于事件时间列可能需要从现有的字段中获得,因此计算列可用于获得事件时间列。例如,原始字段的类型不是 `TIMESTAMP(3)` 或嵌套在 
JSON 字符串中。
 
-Notes:
+注意:
 
-- A computed column defined on a source table is computed after reading from 
the source, it can be used in the following SELECT query statements.
-- A computed column cannot be the target of an INSERT statement. In INSERT 
statements, the schema of SELECT clause should match the schema of the target 
table without computed columns.
+- 定义在一个数据源表( source table )上的计算列会在从数据源读取数据后被计算,它们可以在 SELECT 查询语句后使用。
 
 Review comment:
   ```suggestion
   - 定义在一个数据源表( source table )上的计算列会在从数据源读取数据后被计算,它们可以在 SELECT 查询语句中使用。
   ```

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


With regards,
Apache Git Services

Reply via email to