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

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


The following commit(s) were added to refs/heads/main by this push:
     new cab0decbb0 REST Spec: Add row lineage fields (#13010)
cab0decbb0 is described below

commit cab0decbb0e32bf314039e30807eb033c50665d5
Author: Prashant Singh <35593236+singhpk...@users.noreply.github.com>
AuthorDate: Tue May 27 14:50:22 2025 -0700

    REST Spec: Add row lineage fields (#13010)
    
    Co-authored-by: Prashant Singh <prashant.si...@snowflake.com>
---
 api/src/main/java/org/apache/iceberg/DataFile.java |  6 +++++-
 open-api/rest-catalog-open-api.py                  | 15 +++++++++++++++
 open-api/rest-catalog-open-api.yaml                | 12 ++++++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/api/src/main/java/org/apache/iceberg/DataFile.java 
b/api/src/main/java/org/apache/iceberg/DataFile.java
index 58742e18d7..6433822834 100644
--- a/api/src/main/java/org/apache/iceberg/DataFile.java
+++ b/api/src/main/java/org/apache/iceberg/DataFile.java
@@ -99,7 +99,11 @@ public interface DataFile extends ContentFile<DataFile> {
       optional(140, "sort_order_id", IntegerType.get(), "Sort order ID");
   Types.NestedField SPEC_ID = optional(141, "spec_id", IntegerType.get(), 
"Partition spec ID");
   Types.NestedField FIRST_ROW_ID =
-      optional(142, "first_row_id", LongType.get(), "Starting row ID to assign 
to new rows");
+      optional(
+          142,
+          "first_row_id",
+          LongType.get(),
+          "The first row ID assigned to the first row in the data file");
   Types.NestedField REFERENCED_DATA_FILE =
       optional(
           143,
diff --git a/open-api/rest-catalog-open-api.py 
b/open-api/rest-catalog-open-api.py
index 20674f4564..c01ce71275 100644
--- a/open-api/rest-catalog-open-api.py
+++ b/open-api/rest-catalog-open-api.py
@@ -215,6 +215,11 @@ class Snapshot(BaseModel):
         alias='manifest-list',
         description="Location of the snapshot's manifest list file",
     )
+    first_row_id: Optional[int] = Field(
+        None,
+        alias='first-row-id',
+        description='The first _row_id assigned to the first row in the first 
data file in the first manifest',
+    )
     summary: Summary
     schema_id: Optional[int] = Field(None, alias='schema-id')
 
@@ -1004,6 +1009,11 @@ class ValueMap(BaseModel):
 
 class DataFile(ContentFile):
     content: str = Field(..., const=True)
+    first_row_id: Optional[int] = Field(
+        None,
+        alias='first-row-id',
+        description='The first row ID assigned to the first row in the data 
file',
+    )
     column_sizes: Optional[CountMap] = Field(
         None,
         alias='column-sizes',
@@ -1141,6 +1151,11 @@ class TableMetadata(BaseModel):
     table_uuid: str = Field(..., alias='table-uuid')
     location: Optional[str] = None
     last_updated_ms: Optional[int] = Field(None, alias='last-updated-ms')
+    next_row_id: Optional[int] = Field(
+        None,
+        alias='next-row-id',
+        description="A long higher than all assigned row IDs; the next 
snapshot's first-row-id.",
+    )
     properties: Optional[Dict[str, str]] = None
     schemas: Optional[List[Schema]] = None
     current_schema_id: Optional[int] = Field(None, alias='current-schema-id')
diff --git a/open-api/rest-catalog-open-api.yaml 
b/open-api/rest-catalog-open-api.yaml
index ebabf56718..e9d5ab9a10 100644
--- a/open-api/rest-catalog-open-api.yaml
+++ b/open-api/rest-catalog-open-api.yaml
@@ -2430,6 +2430,10 @@ components:
         manifest-list:
           type: string
           description: Location of the snapshot's manifest list file
+        first-row-id:
+          type: integer
+          format: int64
+          description: The first _row_id assigned to the first row in the 
first data file in the first manifest
         summary:
           type: object
           required:
@@ -2515,6 +2519,10 @@ components:
         last-updated-ms:
           type: integer
           format: int64
+        next-row-id:
+          type: integer
+          format: int64
+          description: A long higher than all assigned row IDs; the next 
snapshot's first-row-id.
         properties:
           type: object
           additionalProperties:
@@ -4299,6 +4307,10 @@ components:
         content:
           type: string
           const: "data"
+        first-row-id:
+          type: integer
+          format: int64
+          description: "The first row ID assigned to the first row in the data 
file"
         column-sizes:
           allOf:
             - $ref: '#/components/schemas/CountMap'

Reply via email to