This is an automated email from the ASF dual-hosted git repository.

jerryshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 67b152fcb1 [#13560] docs: Document Paimon Iceberg visibility for 
primary-key tables (#14994)
67b152fcb1 is described below

commit 67b152fcb10e50ea736c63dda4ab89381afa2228
Author: Yuhui <[email protected]>
AuthorDate: Tue Nov 17 19:14:42 2026 +0800

    [#13560] docs: Document Paimon Iceberg visibility for primary-key tables 
(#14994)
    
    ### What changes were proposed in this pull request?
    
    This PR supersedes #13711 (closed by its author) and fixes #13560 with
    the same documentation change, rebased onto the current main. Credit
    goes to @dennismdejong, who remains the commit author.
    
    - `docs/lakehouse-paimon-catalog.md`: new "Iceberg Compatibility"
    section describing `metadata.iceberg.storage` = `rest-catalog` usage
    with the Iceberg REST service, the primary-key publication rule, and the
    ways to establish a visibility boundary (full compaction,
    `compaction.optimization-interval` / `full-compaction.delta-commits`,
    deletion-vector mode).
    - `docs/iceberg-rest-service.md`: note next to the managed-table-type
    table that metadata is served as the producing engine published it,
    linking to the new section.
    
    ### Why are the changes needed?
    
    Users following the Paimon and Iceberg REST setup see later inserts
    missing from the Iceberg view and report it as a Gravitino bug (#13560).
    For a primary-key table, Paimon's Iceberg metadata publication only
    includes data files merged to the highest LSM level for incremental
    commits, so plain `INSERT`s stay invisible to Iceberg readers until a
    full compaction. Documenting the publication rule and the compaction
    remedies answers the report without a code change.
    
    Fixes #13560
    
    ### Does this PR introduce _any_ user-facing change?
    
    Docs only, no behavior change.
    
    ### How was this patch tested?
    
    Docs-only change. Verified the new relative links and their anchors
    resolve to existing headings, and the external Paimon documentation
    links return HTTP 200. Docs audit scripts (title/H2, intro, heading
    hierarchy and spacing) report no issues for the changed files. The
    described behavior was reproduced with Apache Paimon 1.4.1 (details in
    #13711).
    
    ---------
    
    Co-authored-by: dennismdejong <[email protected]>
---
 docs/iceberg-rest-service.md     |  5 +++++
 docs/lakehouse-paimon-catalog.md | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/docs/iceberg-rest-service.md b/docs/iceberg-rest-service.md
index 34bc8860f9..a2b28e63ae 100644
--- a/docs/iceberg-rest-service.md
+++ b/docs/iceberg-rest-service.md
@@ -18,6 +18,11 @@ The Iceberg REST server and the main Gravitino server expose 
different interface
 | Interfaces         | [Iceberg REST API 
spec](https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml)
 | [Gravitino unified 
interfaces](https://gravitino.apache.org/docs/latest/api/rest/gravitino-rest-api)
 |
 | Managed table type | Iceberg table only                                      
                                                 | JDBC, Hive, Iceberg, Hudi, 
Paimon, etc                                                               |
 
+Tables created by other engines that publish Iceberg metadata through this 
service, for example Paimon
+tables with `metadata.iceberg.storage` set to `rest-catalog`, are served as 
the producing engine published
+them, so that engine's visibility rules still apply. For Paimon primary-key 
tables, see
+[Iceberg compatibility](./lakehouse-paimon-catalog.md#iceberg-compatibility).
+
 ### Capabilities
 
 The Iceberg REST server provides:
diff --git a/docs/lakehouse-paimon-catalog.md b/docs/lakehouse-paimon-catalog.md
index 0b7c9f9fb0..48a2d0b56a 100644
--- a/docs/lakehouse-paimon-catalog.md
+++ b/docs/lakehouse-paimon-catalog.md
@@ -320,6 +320,43 @@ Rename cannot be combined with other changes in a single 
`alterView` call. Submi
 
 Refer to [Manage view metadata using 
Gravitino](./manage-view-metadata-using-gravitino.md) for more details.
 
+## Iceberg Compatibility
+
+Paimon can maintain Iceberg metadata for a table by setting the 
`metadata.iceberg.storage` table property
+(see [Paimon Iceberg 
metadata](https://paimon.apache.org/docs/master/iceberg/)). When it is set to
+`rest-catalog`, Paimon publishes the table's Iceberg metadata through the 
Iceberg REST service named by
+`metadata.iceberg.rest.uri`, and `metadata.iceberg.rest.warehouse` selects 
which Gravitino catalog stores
+that metadata (see
+[Client Catalog 
Selection](./iceberg-rest-service.md#client-catalog-selection)). An Iceberg 
client pointed
+at the same service can then read the Paimon table.
+
+:::info
+Gravitino's Iceberg REST service serves table metadata as the producing engine 
published it, so the
+visibility rules of that engine still apply.
+:::
+
+For **primary-key** tables, Paimon's publication rule decides what Iceberg 
readers can see. Iceberg readers
+cannot merge LSM files, so for incremental commits Paimon publishes only the 
data files that have been
+merged to the highest LSM level, while a plain `INSERT` writes its files below 
that level. Such writes are
+committed to the Paimon table, and are visible to Paimon readers, but they do 
not appear in the Iceberg
+metadata until a full compaction moves the merged result to the highest level. 
The first commit of a table
+is an exception, because it publishes a full snapshot, so the first write is 
visible immediately.
+
+Run a full compaction to establish the visibility boundary:
+
+```sql
+CALL paimon_catalog.sys.compact(`table` => 'db.tbl', compact_strategy => 
'full');
+```
+
+Alternatively, let Paimon compact periodically with 
`compaction.optimization-interval` or
+`full-compaction.delta-commits`. Deletion-vector mode 
(`metadata.iceberg.format-version` = `3`,
+`deletion-vectors.enabled` = `true`, `deletion-vectors.bitmap64` = `true`, 
read by an Iceberg client with
+v3 support) publishes files above level 0 as well, which shortens the delay 
but still excludes the newest
+level-0 files.
+
+See [Primary Key 
Tables](https://paimon.apache.org/docs/master/iceberg/primary-key-table/) in 
the Paimon
+documentation for the full publication rules.
+
 ## HDFS Configuration
 
 Place `core-site.xml` and `hdfs-site.xml` in the 
`catalogs/lakehouse-paimon/conf` directory to automatically load as the default 
HDFS configuration.

Reply via email to