Skip to content

Commit ebbb9a1

Browse files
Spark: Fix row lineage inheritance for distributed planning
1 parent 0aab581 commit ebbb9a1

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/SparkRowLevelOperationsTestBase.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,18 @@ public static Object[][] parameters() {
196196
LOCAL,
197197
3
198198
},
199+
{
200+
"testhadoop",
201+
SparkCatalog.class.getName(),
202+
ImmutableMap.of("type", "hadoop"),
203+
FileFormat.PARQUET,
204+
false,
205+
WRITE_DISTRIBUTION_MODE_HASH,
206+
true,
207+
null,
208+
DISTRIBUTED,
209+
3
210+
},
199211
{
200212
"spark_catalog",
201213
SparkSessionCatalog.class.getName(),

spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/ManifestFileBean.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class ManifestFileBean implements ManifestFile, Serializable {
3636
private Long addedSnapshotId = null;
3737
private Integer content = null;
3838
private Long sequenceNumber = null;
39+
private Long firstRowId = null;
3940

4041
public static ManifestFileBean fromManifest(ManifestFile manifest) {
4142
ManifestFileBean bean = new ManifestFileBean();
@@ -46,6 +47,7 @@ public static ManifestFileBean fromManifest(ManifestFile manifest) {
4647
bean.setAddedSnapshotId(manifest.snapshotId());
4748
bean.setContent(manifest.content().id());
4849
bean.setSequenceNumber(manifest.sequenceNumber());
50+
bean.setFirstRowId(manifest.firstRowId());
4951

5052
return bean;
5153
}
@@ -98,6 +100,10 @@ public void setSequenceNumber(Long sequenceNumber) {
98100
this.sequenceNumber = sequenceNumber;
99101
}
100102

103+
public void setFirstRowId(Long firstRowId) {
104+
this.firstRowId = firstRowId;
105+
}
106+
101107
@Override
102108
public String path() {
103109
return path;
@@ -173,6 +179,11 @@ public ByteBuffer keyMetadata() {
173179
return null;
174180
}
175181

182+
@Override
183+
public Long firstRowId() {
184+
return firstRowId;
185+
}
186+
176187
@Override
177188
public ManifestFile copy() {
178189
throw new UnsupportedOperationException("Cannot copy");

0 commit comments

Comments
 (0)