Repository navigation
Conversation
…Files.read Iceberg 1.12 removed ManifestFiles.read(ManifestFile, FileIO). The executor reflection probe looked that overload up, so on 1.12 every native Iceberg write fell back to the JVM writer, and the decode of the task manifest would have failed the same way. Look up read(ManifestFile, FileIO, Map) instead, which every supported Iceberg release has, and pass a null specs map. That is what the removed overload did, so the reader keeps using the partition spec embedded in the manifest. Closes apache#7240. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f90e170c-37ea-4416-a3e7-c86bef8814ca
tlfua
force-pushed
the
tlfua/fix/7240-iceberg-1.12-manifest-read
branch
from
November 7, 2026 09:17
592bc44 to
b348a47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #7240.
Rationale for this change
Iceberg 1.12 removed the 2-arg
ManifestFiles.read(ManifestFile, FileIO).IcebergReflectionresolves that overload in the executor-side reflection probe and inreadDataFilesFromManifest. On 1.12 the probe now fails withNoSuchMethodException, so every native Iceberg write falls back to the JVM writer.In every release that has it (1.5.2 through 1.11), the 2-arg overload just delegates to
read(ManifestFile, FileIO, Map<Integer, PartitionSpec>)with anullmap. The 3-arg overload is present in all supported versions, 1.5.2 through 1.12.0.What changes are included in this PR?
IcebergReflectionadds a privatemanifestFilesReadMethod()that resolves the 3-argManifestFiles.read. The probe andreadDataFilesFromManifestboth use it. The decode passesnullfor the specs map, the same call the 2-arg overload made, so behavior on every currently pinned Iceberg version (1.5.2, 1.8.1, 1.10.0, 1.11.0) is unchanged.null: the reader must use the spec embedded in the manifest, whichmanifest_partition_speciniceberg_write.rswrites and which for a void-only V1 spec has no fields. It also records that thenullpath is deprecated upstream and slated for removal in Iceberg 2.0.IcebergReflectionSuitetests write a manifest with Iceberg's ownManifestFiles.writeand decode it throughdecodeManifestToDataFiles. The first uses a partitioned spec with a non-zero spec id; the second uses a spec with no fields. Both run in every existing profile.On the deprecation warning: with a
nullmap, Iceberg 1.11 already logsManifestReader"...deprecated and will be removed in the 1.12.0 release". 1.12 logs the same warning but names 2.0.0. The default 1.11 profile hits this path today, so this PR adds no new warning on the pinned versions.Follow-ups, not in this PR:
null.CometIcebergWriteDetectionSuitegetConfoverride andRESTCatalogAdapterREST API changes), so that needs its own PR.How are these changes tested?
Unit tests. The local command below runs on Spark 4.1 with Iceberg 1.11:
Result: 33 tests succeeded, 0 failed.
spotless:checkpasses.Pinned versions unchanged, fork CI. All jobs passed in both runs:
ci.ymlPR tiericeberg_spark_test_reusable.yml)The verification workflow lives only on a fork branch and is not part of this PR.
Iceberg 1.12, end to end, fork CI. The same run has a job per leg. Each leg pins Iceberg 1.12.0 (javap-checked on the runtime jar), compiles Comet main sources, and runs a Spark 4.1 session with Comet native Iceberg writes enabled. It inserts into two tables:
It then checks the plan, rows, a pruned read, and the
filesmetadata (spec_id, partitions). Thebaseleg runs the same check onmain(b82f5ea) without this change.fixbase(without this PR)NoneNoSuchMethodException: ManifestFiles.read(ManifestFile,FileIO)CometIcebergWrite)spec_id/ partitionsjavap on
iceberg-spark-runtime-4.1_2.13-1.12.0.jarlists only:The issue comment linked from #7240 has the original reproduction.