fsk119 commented on a change in pull request #14437: URL: https://github.com/apache/flink/pull/14437#discussion_r549564559
########## File path: docs/dev/table/sql/gettingStarted.zh.md ########## @@ -129,11 +128,11 @@ FROM employee_information GROUP BY dep_id; {% endhighlight %} -Such queries are considered _stateful_. Flink's advanced fault-tolerance mechanism will maintain internal state and consistency, so queries always return the correct result, even in the face of hardware failure. +这样的查询被认为是 _有状态的_。Flink 的高级容错机制将维持内部状态和一致性,因此即使遇到硬件故障,查询也始终返回正确结果。 -## Sink Tables +## Sink 表 -When running this query, the SQL client provides output in real-time but in a read-only fashion. Storing results - to power a report or dashboard - requires writing out to another table. This can be achieved using an `INSERT INTO` statement. The table referenced in this clause is known as a sink table. An `INSERT INTO` statement will be submitted as a detached query to the Flink cluster. +当运行此查询时,SQL 客户端实时但是以只读方式提供输出。存储结果,作为报表或仪表板的数据来源,需要写到另一个表。这可以使用 `INSERT INTO` 语句来实现。本节中引用的表称为 sink 表。`INSERT INTO` 语句将作为一个独立查询被提交到 Flink 集群中。 {% highlight sql %} INSERT INTO department_counts Review comment: Please remove this blank space. ![image](https://user-images.githubusercontent.com/33114724/103258946-37058300-49d2-11eb-9070-e660eae05f45.png) ########## File path: docs/dev/table/sql/gettingStarted.zh.md ########## @@ -113,13 +112,13 @@ SELECT * from employee_information WHERE DeptId = 1; {% top %} -## Continuous Queries +## 连续查询 -While not designed initially with streaming semantics in mind, SQL is a powerful tool for building continuous data pipelines. Where Flink SQL differs from traditional database queries is that is continuously consuming rows as the arrives and produces updates to its results. +虽然最初设计时没有考虑流语义,但 SQL 是用于构建连续数据流水线的强大工具。Flink SQL 与传统数据库查询的不同之处在于,Flink SQL 持续消费到达的行并对其结果进行更新。 -A [continuous query]({% link dev/table/streaming/dynamic_tables.zh.md %}#continuous-queries) never terminates and produces a dynamic table as a result. [Dynamic tables]({% link dev/table/streaming/dynamic_tables.zh.md %}#continuous-queries) are the core concept of Flink's Table API and SQL support for streaming data. +一个[连续查询]({% link dev/table/streaming/dynamic_tables.zh.md %}#continuous-queries)永远不会终止,并会产生一个动态表作为结果。[动态表]({% link dev/table/streaming/dynamic_tables.zh.md %}#continuous-queries)是 Flink 中 Table API 和 SQL 对流数据支持的核心概念。 -Aggregations on continuous streams need to store aggregated results continuously during the execution of the query. For example, suppose you need to count the number of employees for each department from an incoming data stream. The query needs to maintain the most up to date count for each department to output timely results as new rows are processed. +连续流上的聚合需要在查询执行期间不断地存储聚合的结果。例如,假设你需要从传入的数据流中计算每个部门的员工人数。查询需要维护每个部门最新的计算总数,以便在处理新行时及时输出结果。 {% highlight sql %} SELECT Review comment: Please delete empty space before `SELECT` ![image](https://user-images.githubusercontent.com/33114724/103259026-a3808200-49d2-11eb-8a7a-6a71999a8395.png) ---------------------------------------------------------------- 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