# 开放表格式

开放表格式是一种开放治理的规范，它将表元数据——即每个版本中哪些文件构成一张表、这些文件的模式与统计信息——与事务协议结合起来，后者是写入者原子化提交变更、读取者看到一致快照所依据的规则。该格式将存放在云对象存储中的文件转化为类似数据库表的东西，支持ACID事务、模式演进和时间旅行，而底层数据仍保持为[Apache Parquet](https://www.edgepedia.org/zh/apache-parquet)或[Apache ORC](https://www.edgepedia.org/zh/apache-orc)等开放文件格式<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。主要格式包括[Apache Hudi](https://www.edgepedia.org/zh/apache-hudi)、Apache Iceberg、Delta Lake和Apache Paimon，由于规范是开放的，Apache Spark、Apache Flink和Trino等查询引擎无需专有系统即可读写同一张表<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义 | 元数据（每个版本的文件、模式、统计信息）加上用于原子提交和一致快照的事务协议<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup> |
| 主要格式 | Apache Hudi（Uber，2016）、Apache Iceberg（Netflix，约2017）、Delta Lake（Databricks，2017，2019年开源）、Apache Paimon（Flink社区，2022）<sup>[2](https://www.pracdata.io/p/the-history-and-evolution-of-open-14d)</sup> |
| 核心能力 | ACID事务、快照隔离、模式演进、时间旅行、行级更新与删除，三大主流格式均有文档记载<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup> |
| 底层数据 | 保持为开放文件格式，通常为Apache Parquet或Apache ORC<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup> |
| 治理 | 四大主要格式中有三个归属Apache软件基金会，Delta Lake归属Linux基金会<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup> |
| 采用情况 | 2024年一项调查中，39%的受访者使用Delta Lake，31%使用Iceberg；而在计划采用者中，Iceberg以29.2%领先，Delta为22.9%<sup>[3](https://www.dremio.com/wp-content/uploads/2023/11/whitepaper-2024-state-of-the-data-lakehouse_report.pdf)</sup> |
| 互操作性 | Apache XTable可在Hudi、Iceberg和Delta Lake之间任意方向转换元数据，无需重写数据文件；Delta UniForm在Delta日志之外生成Iceberg元数据<sup>[4](https://xtable.apache.org/)</sup><sup> • </sup><sup>[5](https://delta.io/blog/delta-lake-3-0/)</sup> |

## 表格式为何存在

得益于[Amazon S3](https://www.edgepedia.org/zh/amazon-s3)、Azure Blob Storage和Google Cloud Storage等云对象存储，存储近乎无限的数据变得廉价，而列式文件格式使扫描变得快速；然而，一堆Parquet文件并不构成一张表，因为它缺少原子提交、记录级更新与删除、可查询的历史，以及对在目录被重写时进行扫描的读取者的任何保护措施。<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>

在表格式出现之前的时代，数据湖默认依赖[Apache Hive](https://www.edgepedia.org/zh/apache-hive)风格的表抽象：目录代表表，子目录代表分区，而模式和分区列表由[Hive Metastore](https://www.edgepedia.org/zh/hive-metastore)跟踪。向对象存储写入一千个Parquet文件不是原子操作，因此失败的任务会留下部分数据，并发任务互相覆盖，且无法回滚。团队通过临时前缀和调度纪律来绕过这个问题，或者将整理好的数据复制到数据仓库中、把湖当作暂存区，这导致了两套系统、两份副本，以及它们之间可能发生漂移的管道<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup><sup> • </sup><sup>[6](https://opendatalakehouse.com/history/)</sup>。更新或删除一条记录意味着重写整个分区，这使得从业务数据库进行变更数据捕获和GDPR删除变得昂贵<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。

## 表格式的构成

剥去品牌包装，每种开放表格式本质上都是一份规范，描述了一小组协同工作、与数据文件放在一起的元数据组件。<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>

- **变更日志。** 格式的核心是一份有序的每次提交记录，无论是数据写入、删除、模式变更还是维护操作。Hudi称之为时间线，Delta Lake称为事务日志，Iceberg则维护一条从表元数据文件引用的快照链。日志是权威记录：一项修改只有提交到该日志中才算表的一部分，而提交在存储上是原子完成的<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。
- **快照与版本管理。** 每次提交都会产生表的一个新的一致视图，因此读取者可以查询任何保留版本的表，从而实现时间旅行、错误写入的回滚，以及在跟踪记录级变更的情况下，返回两个时间点之间仅发生变化内容的增量查询<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。
- **文件级统计与索引。** 各格式跟踪每文件和每列的统计信息，如最小值/最大值、空值计数和记录数，使引擎能够跳过不可能包含匹配行的文件。Hudi将其推广为一个多模态索引子系统，包含列统计、布隆过滤器和记录级索引，同时也加速更新和删除<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。
- **模式跟踪与演进。** 格式存储模式并定义添加、重命名或提升列类型的规则，无需重写现有文件，同时支持写入时的模式强制<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。
- **并发控制。** 所有主流格式都为读取者提供快照隔离，而并发写入者使用从乐观并发控制到非阻塞方法的各种机制。在实现上，Delta Lake依赖存储服务通过put-if-absent等操作实现原子性，在需要时通过DynamoDB进行协调，而Hudi和Iceberg使用在ZooKeeper、Hive Metastore或DynamoDB中实现的表级锁<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup><sup> • </sup><sup>[7](https://www.cidrdb.org/cidr2023/papers/p92-jain.pdf)</sup>。

数据的物理组织方式各有不同。Hudi提供两种表格式：写时复制（Copy-on-Write），在数据更新时重写基础文件，为读取者提供最佳性能；以及读时合并（Merge-on-Read），将变更记录在紧凑的日志文件中并定期合并，降低写入延迟，但可能减慢需要将这些日志与基础文件合并的读取<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup><sup> • </sup><sup>[11](https://hudi.apache.org/docs/table_types/)</sup>。

## 主要格式及其起源

当前这一代格式源于2016年至2019年间特定的生产需求<sup>[2](https://www.pracdata.io/p/the-history-and-evolution-of-open-14d)</sup>。

**Apache Hudi**由Uber于2016年发起，用于可扩展的增量插入或更新和流式摄取，在HDFS上提供ACID保证，并于2017年初在Uber的工程博客上公开描述。准确地说，它是一个表格式加上一个存储引擎：除了规范之外，它还附带一个写入器运行时，具有可插拔索引和内置表服务，如压缩、聚类、清理和索引<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup><sup> • </sup><sup>[2](https://www.pracdata.io/p/the-history-and-evolution-of-open-14d)</sup>。

**Apache Iceberg**约于2017年在Netflix诞生，回应Hive面向目录的格式在可扩展性和事务性方面的局限，并于2018年捐赠给[Apache软件基金会](https://www.edgepedia.org/zh/apache-software-foundation)。其设计核心是引擎无关的表元数据规范，具有不可变快照、隐藏分区和定义良好的元数据演进；它有意将自身范围限定在格式和库，将维护工作留给引擎<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup><sup> • </sup><sup>[2](https://www.pracdata.io/p/the-history-and-evolution-of-open-14d)</sup>。Iceberg的规范版本1、2和3已完成并被采用，版本4正在积极开发中，尚未正式采用<sup>[8](https://iceberg.apache.org/spec/)</sup>。

**Delta Lake**由[Databricks](https://www.edgepedia.org/zh/databricks)于2017年推出，2019年开源，由Linux基金会治理。它以基于JSON的事务日志为核心，配有定期的Parquet检查点，并作为Databricks的原生格式与Spark深度集成<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup><sup> • </sup><sup>[2](https://www.pracdata.io/p/the-history-and-evolution-of-open-14d)</sup>。

**Apache Paimon**由Flink社区于2022年开发，最初名为“Flink Table Store”，自2024年起成为Apache顶级项目，目标是在湖上实现LSM树存储，以支持来自Apache Flink的高频流式写入<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup><sup> • </sup><sup>[2](https://www.pracdata.io/p/the-history-and-evolution-of-open-14d)</sup>。

Hudi项目提供了一个有用的简明概括：Iceberg是一种表格式；Hudi和Delta Lake则不止于此，内部包含一种表格式<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。

## 表格式、文件格式与湖仓一体

这三个术语是不同的层次。Parquet、ORC或Avro等文件格式定义了记录如何在单个文件内编码，对其他文件一无所知。表格式定义了多个文件加上元数据如何构成一张有版本、有事务的表，直接位于文件格式之上。数据湖仓一体是整体架构：云对象存储、开放文件格式、表格式、目录和查询引擎组合成湖上的类仓库平台。Parquet不是表格式，仅有表格式也不构成湖仓一体<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。

在控制平面一侧，目录记录存在的表并引导引擎找到每张表的当前元数据；选择包括历史悠久的Hive Metastore和AWS Glue Data Catalog，以及较新的[Apache Polaris](https://www.edgepedia.org/zh/apache-polaris)、Unity Catalog和[Apache Gravitino](https://www.edgepedia.org/zh/apache-gravitino)<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。

## 互操作性与时间旅行的实践

选择一种格式越来越不意味着无法回头。[Apache XTable](https://www.edgepedia.org/zh/apache-xtable)由微软、谷歌和Onehouse联合发起，后捐赠给ASF，可在Hudi、Iceberg和Delta Lake之间任意方向转换表元数据，无需复制或重写数据文件，可作为一次性转换或持续增量同步<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。微软Fabric中的OneLake在底层使用了它，Delta UniForm在Delta事务日志之外生成Iceberg元数据，使一份数据可以以任一格式读取<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup><sup> • </sup><sup>[5](https://delta.io/blog/delta-lake-3-0/)</sup>。

对版本保证的一项实际测试查询了三大主流格式中同一张表的第一个和第二个版本：每个格式对版本一返回3,475,226行，对版本二返回7,052,769行，Iceberg的文件清单记录计数与这些总数匹配，且无需读取任何数据。一个操作细节很重要：当按时钟时间而非版本号进行时间旅行时，必须显式传递时区，因为一个受测读取器将未指定时区的时间解释为本地时间，另一个解释为UTC，相差五个半小时，返回了不同的表版本<sup>[9](https://www.systemdesign.academy/courses/advanced/lessons/data-engineering/open-table-formats)</sup>。

## 性能与格式选择

已发布的性能比较异常不一致，有记录的方法论错误包括压缩不匹配和数据集过小。一项经过纠正的2022年TPC-DS扫描密集型基准测试发现，Hudi和Delta Lake之间的加载性能差距在6%以内，查询性能无实质性差异，表明格式选择对变更密集型工作负载最重要，对读取为主、仅追加的工作负载最不重要<sup>[10](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7551238)</sup>。在变更密集型基准测试中，写入路径机制（如索引和读时合并设计）占主导地位：Hudi项目的一项基准测试报告称，在10 TB倾斜的变更密集型事实表上，增量写入延迟约为Iceberg的四分之一、Delta Lake的六分之一，尽管来源承认其与所比较的项目之一有关联<sup>[10](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7551238)</sup>。

调查将选择因素排序为：性能（77%的受访者）、与特定工具或平台的兼容性（72%）、特定功能（62%）和开放生态系统（59%）<sup>[3](https://www.dremio.com/wp-content/uploads/2023/11/whitepaper-2024-state-of-the-data-lakehouse_report.pdf)</sup>。各格式自身的定位总结了权衡：Hudi适用于高容量、可变、增量摄取；Iceberg适用于引擎中立、目录支持广泛的规范；Delta Lake适用于与Spark和Databricks的深度集成；Paimon适用于基于LSM的Flink流式写入<sup>[1](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)</sup>。

## References

1. [What is an Open Table Format? | Apache Hudi](https://hudi.apache.org/blog/2026/07/14/what-is-an-open-table-format/)
2. [The History and Evolution of Open Table Formats - Part II, Pracdata](https://www.pracdata.io/p/the-history-and-evolution-of-open-14d)
3. [2024 State of the Data Lakehouse Report, Dremio](https://www.dremio.com/wp-content/uploads/2023/11/whitepaper-2024-state-of-the-data-lakehouse_report.pdf)
4. [Apache XTable (Incubating)](https://xtable.apache.org/)
5. [Delta Lake 3.0.0, delta.io](https://delta.io/blog/delta-lake-3-0/)
6. [How the open lakehouse emerged, OpenDataLakehouse](https://opendatalakehouse.com/history/)
7. [Analyzing and Comparing Lakehouse Storage Systems, CIDR 2023](https://www.cidrdb.org/cidr2023/papers/p92-jain.pdf)
8. [Iceberg Table Spec, Apache Iceberg](https://iceberg.apache.org/spec/)
9. [Open Table Formats: What Delta Lake, Iceberg and Hudi Actually Write Down, systemdesign.academy](https://www.systemdesign.academy/courses/advanced/lessons/data-engineering/open-table-formats)
10. [A Comparative Analysis of Apache Iceberg, Delta Lake, and Apache Hudi for Open Table Format Selection, SSRN](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7551238)
11. [Table & Query Types, Apache Hudi](https://hudi.apache.org/docs/table_types/)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems › Data mining, warehousing, and big data › Big data concepts

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/open-table-format

English original: https://www.edgepedia.org/open-table-format
