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

findepi 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 3e3c171095 Core: Add 
org.apache.iceberg.DataFiles.Builder#withSortOrderId (#15217)
3e3c171095 is described below

commit 3e3c171095defb8a43309b36424775d51152e625
Author: Raunaq Morarka <[email protected]>
AuthorDate: Fri Feb 13 18:05:17 2026 +0530

    Core: Add org.apache.iceberg.DataFiles.Builder#withSortOrderId (#15217)
---
 core/src/main/java/org/apache/iceberg/DataFiles.java    |  5 +++++
 core/src/test/java/org/apache/iceberg/ScanTestBase.java | 11 +++++++++++
 2 files changed, 16 insertions(+)

diff --git a/core/src/main/java/org/apache/iceberg/DataFiles.java 
b/core/src/main/java/org/apache/iceberg/DataFiles.java
index b06325b754..4a991f6230 100644
--- a/core/src/main/java/org/apache/iceberg/DataFiles.java
+++ b/core/src/main/java/org/apache/iceberg/DataFiles.java
@@ -321,6 +321,11 @@ public class DataFiles {
       return this;
     }
 
+    public Builder withSortOrderId(int newSortOrderId) {
+      this.sortOrderId = newSortOrderId;
+      return this;
+    }
+
     public Builder withFirstRowId(Long nextRowId) {
       this.firstRowId = nextRowId;
       return this;
diff --git a/core/src/test/java/org/apache/iceberg/ScanTestBase.java 
b/core/src/test/java/org/apache/iceberg/ScanTestBase.java
index de11730337..d5cdec579e 100644
--- a/core/src/test/java/org/apache/iceberg/ScanTestBase.java
+++ b/core/src/test/java/org/apache/iceberg/ScanTestBase.java
@@ -238,6 +238,17 @@ public abstract class ScanTestBase<
                 .build())
         .commit();
 
+    table
+        .newFastAppend()
+        .appendFile(
+            DataFiles.builder(PartitionSpec.unpartitioned())
+                .withPath("/path/to/data/b.parquet")
+                .withFileSizeInBytes(10)
+                .withRecordCount(1)
+                .withSortOrderId(1)
+                .build())
+        .commit();
+
     TableScan scan = table.newScan();
     try (CloseableIterable<FileScanTask> tasks = scan.planFiles()) {
       for (FileScanTask fileScanTask : tasks) {

Reply via email to