Repository navigation
Description
Is your feature request related to a problem or challenge?
FastAppendAction rejects any data file whose partition_spec_id is not the table's current default spec:
if metadata.default_partition_spec_id() != data_file.partition_spec_id {
return Err(invalid_data!(
"Data file partition spec id does not match table default partition spec id"
));
}This is stricter than the format allows: a snapshot may reference manifests written under any of the table's partition specs, and iceberg-java's FastAppend groups new files by spec (newDataFilesBySpec) and writes one manifest per spec.
The check also makes a legitimate retry fail. A writer produces files under spec 0, hits a commit conflict, and in the meantime another transaction changes the default spec to spec 1. Spec 0 is still a valid spec on the table and the files are fine, but the retry is rejected. This was raised in review of #3474 and predates that PR (the same check existed in the old SnapshotProducer).
Describe the solution you'd like
In SimpleSnapshotProducer:
-
Validate against the file's own spec. Replace the default-spec equality check with
metadata.partition_spec_by_id(data_file.partition_spec_id); fail only if the spec is unknown to the table. Validate the partition value against that spec's partition type (spec.partition_type(schema)), notdefault_partition_type(). -
Group by spec when writing. Bucket the added files by
partition_spec_id(aBTreeMapkeeps manifest-list order deterministic) and write one manifest per bucket under that spec. The resultingVec<ManifestFile>goes intoAddedManifests.manifests, whose shape already allows several manifests per append. -
Summary uses the file's spec.
snapshot_helpers::build_summarycurrently passesdefault_partition_spec()for added files; usepartition_spec_by_id(file.partition_spec_id)as the removed-files branch already does.
Tests: an append mixing files from two specs yields two manifests, each under its own spec, and the duplicate-file / summary paths still work; a file under a non-default but valid spec commits successfully.
Related: epic #3266, milestone-2 PR #3474, rolling manifests #3499.
Willingness to contribute
I can contribute to this feature independently
Activity
szehon-ho commentedon Nov 9, 2026
@CTTY hi! wondering are you working on this? was interested/hoping to help on the iceberg-rust side, and wondering about this one, thanks either way!
CTTY commentedon Nov 9, 2026
Hey @szehon-ho , good to see you on the rust side and welcome to contribute! I'm not actively working on it and will assign this to you