This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 7df486e [FLINK-18394][docs-zh] Translate "Parquet Format" page into
Chinese
7df486e is described below
commit 7df486e4f3557e29d6a5d17bc3650388377c58c6
Author: Luxios22 <[email protected]>
AuthorDate: Tue Jun 30 15:33:30 2020 +0800
[FLINK-18394][docs-zh] Translate "Parquet Format" page into Chinese
This closes #12772
---
docs/dev/table/connectors/formats/parquet.zh.md | 57 ++++++++++++-------------
1 file changed, 28 insertions(+), 29 deletions(-)
diff --git a/docs/dev/table/connectors/formats/parquet.zh.md
b/docs/dev/table/connectors/formats/parquet.zh.md
index e6a4876..5f06656 100644
--- a/docs/dev/table/connectors/formats/parquet.zh.md
+++ b/docs/dev/table/connectors/formats/parquet.zh.md
@@ -1,5 +1,5 @@
---
-title: "Parquet Format"
+title: "Parquet 格式"
nav-title: Parquet
nav-parent_id: sql-formats
nav-pos: 5
@@ -29,22 +29,21 @@ under the License.
* This will be replaced by the TOC
{:toc}
-The [Apache Parquet](https://parquet.apache.org/) format allows to read and
write Parquet data.
+[Apache Parquet](https://parquet.apache.org/) 格式允许读写 Parquet 数据.
-Dependencies
+依赖
------------
-In order to setup the Parquet format, the following table provides dependency
information for both
-projects using a build automation tool (such as Maven or SBT) and SQL Client
with SQL JAR bundles.
+为设置 Parquet 格式,下表为使用自动化构建工具(例如 Maven 或 SBT)的项目及SQL 客户端皆提供了所需的依赖信息。
| Maven dependency | SQL Client JAR |
| :----------------- | :----------------------|
-| flink-parquet{{site.scala_version_suffix}} |{% if site.is_stable
%}[Download](https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-parquet{{site.scala_version_suffix}}/{{site.version}}/flink-sql-parquet{{site.scala_version_suffix}}-{{site.version}}.jar)
{% else %} Only available for stable releases {% endif %}|
+| flink-parquet{{site.scala_version_suffix}} |{% if site.is_stable
%}[Download](https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-parquet{{site.scala_version_suffix}}/{{site.version}}/flink-sql-parquet{{site.scala_version_suffix}}-{{site.version}}.jar)
{% else %} 仅可用于稳定版本 {% endif %}|
-How to create a table with Parquet format
+如何创建基于 Parquet 格式的表
----------------
-Here is an example to create a table using Filesystem connector and Parquet
format.
+以下为用 Filesystem 连接器和 Parquet 格式创建表的示例,
<div class="codetabs" markdown="1">
<div data-lang="SQL" markdown="1">
@@ -65,56 +64,56 @@ CREATE TABLE user_behavior (
</div>
</div>
-Format Options
+Format 参数
----------------
<table class="table table-bordered">
<thead>
<tr>
- <th class="text-left" style="width: 25%">Option</th>
- <th class="text-center" style="width: 8%">Required</th>
- <th class="text-center" style="width: 7%">Default</th>
- <th class="text-center" style="width: 10%">Type</th>
- <th class="text-center" style="width: 50%">Description</th>
+ <th class="text-left" style="width: 25%">参数</th>
+ <th class="text-center" style="width: 8%">是否必须</th>
+ <th class="text-center" style="width: 7%">默认值</th>
+ <th class="text-center" style="width: 10%">类型</th>
+ <th class="text-center" style="width: 50%">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td><h5>format</h5></td>
- <td>required</td>
+ <td>必选</td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
- <td>Specify what format to use, here should be 'parquet'.</td>
+ <td>指定使用的格式,此处应为"parquet"。</td>
</tr>
<tr>
<td><h5>parquet.utc-timezone</h5></td>
- <td>optional</td>
+ <td>可选</td>
<td style="word-wrap: break-word;">false</td>
<td>Boolean</td>
- <td>Use UTC timezone or local timezone to the conversion between epoch
time and LocalDateTime. Hive 0.x/1.x/2.x use local timezone. But Hive 3.x use
UTC timezone.</td>
+ <td>使用 UTC 时区或本地时区在纪元时间和 LocalDateTime 之间进行转换。Hive 0.x/1.x/2.x 使用本地时区,但
Hive 3.x 使用 UTC 时区。</td>
</tr>
</tbody>
</table>
-Parquet format also supports configuration from
[ParquetOutputFormat](https://www.javadoc.io/doc/org.apache.parquet/parquet-hadoop/1.10.0/org/apache/parquet/hadoop/ParquetOutputFormat.html).
-For example, you can configure `parquet.compression=GZIP` to enable gzip
compression.
+Parquet 格式也支持
[ParquetOutputFormat](https://www.javadoc.io/doc/org.apache.parquet/parquet-hadoop/1.10.0/org/apache/parquet/hadoop/ParquetOutputFormat.html)
的配置。
+例如, 可以配置 `parquet.compression=GZIP` 来开启 gzip 压缩。
-Data Type Mapping
+数据类型映射
----------------
-Currently, Parquet format type mapping is compatible with Apache Hive, but
different with Apache Spark:
+目前,Parquet 格式类型映射与 Apache Hive 兼容,但与 Apache Spark 有所不同:
-- Timestamp: mapping timestamp type to int96 whatever the precision is.
-- Decimal: mapping decimal type to fixed length byte array according to the
precision.
+- Timestamp:不论精度,映射 timestamp 类型至 int96。
+- Decimal:根据精度,映射 decimal 类型至固定长度字节的数组。
-The following table lists the type mapping from Flink type to Parquet type.
+下表列举了 Flink 中的数据类型与 JSON 中的数据类型的映射关系。
<table class="table table-bordered">
<thead>
<tr>
- <th class="text-left">Flink Data Type</th>
- <th class="text-center">Parquet type</th>
- <th class="text-center">Parquet logical type</th>
+ <th class="text-left">Flink 数据类型</th>
+ <th class="text-center">Parquet 类型</th>
+ <th class="text-center">Parquet 逻辑类型</th>
</tr>
</thead>
<tbody>
@@ -186,4 +185,4 @@ The following table lists the type mapping from Flink type
to Parquet type.
</tbody>
</table>
-<span class="label label-danger">Attention</span> Composite data type: Array,
Map and Row are not supported.
+<span class="label label-danger">注意</span> 暂不支持复合数据类型(Array、Map 与 Row)。