Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ protected Dataset<FileInfo> contentFileDS(Table table, Set<Long> snapshotIds) {
"length",
"0 as sequenceNumber",
"partition_spec_id as partitionSpecId",
"added_snapshot_id as addedSnapshotId")
"added_snapshot_id as addedSnapshotId",
"key_metadata as keyMetadata")
.dropDuplicates("path")
.repartition(numShufflePartitions) // avoid adaptive execution combining tasks
.as(ManifestFileBean.ENCODER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class ManifestFileBean implements ManifestFile, Serializable {
private Integer content = null;
private Long sequenceNumber = null;
private Long firstRowId = null;
private byte[] keyMetadata = null;

public static ManifestFileBean fromManifest(ManifestFile manifest) {
ManifestFileBean bean = new ManifestFileBean();
Expand All @@ -48,6 +49,7 @@ public static ManifestFileBean fromManifest(ManifestFile manifest) {
bean.setContent(manifest.content().id());
bean.setSequenceNumber(manifest.sequenceNumber());
bean.setFirstRowId(manifest.firstRowId());
bean.setKeyMetadata(manifest.keyMetadata() == null ? null : manifest.keyMetadata().array());

return bean;
}
Expand Down Expand Up @@ -104,6 +106,14 @@ public void setFirstRowId(Long firstRowId) {
this.firstRowId = firstRowId;
}

public byte[] getKeyMetadata() {
return keyMetadata;
}

public void setKeyMetadata(byte[] keyMetadata) {
this.keyMetadata = keyMetadata;
}

@Override
public String path() {
return path;
Expand Down Expand Up @@ -176,7 +186,7 @@ public List<PartitionFieldSummary> partitions() {

@Override
public ByteBuffer keyMetadata() {
return null;
return keyMetadata == null ? null : ByteBuffer.wrap(keyMetadata);
}

@Override
Expand Down