Skip to content

Commit

Permalink
Core: Fix generated position delete file spec (apache#11458)
Browse files Browse the repository at this point in the history
  • Loading branch information
aokolnychyi authored Nov 4, 2024
1 parent 9dcf0d3 commit af5be32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/test/java/org/apache/iceberg/FileGenerationUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ public static DeleteFile generateEqualityDeleteFile(Table table, StructLike part
}

public static DeleteFile generatePositionDeleteFile(Table table, DataFile dataFile) {
PartitionSpec spec = table.spec();
PartitionSpec spec = table.specs().get(dataFile.specId());
StructLike partition = dataFile.partition();
LocationProvider locations = table.locationProvider();
String path = locations.newDataLocation(spec, partition, generateFileName());
long fileSize = generateFileSize();
Metrics metrics = generatePositionDeleteMetrics(dataFile);
return FileMetadata.deleteFileBuilder(table.spec())
return FileMetadata.deleteFileBuilder(spec)
.ofPositionDeletes()
.withPath(path)
.withPartition(partition)
Expand Down

0 comments on commit af5be32

Please sign in to comment.