Skip to content

feat(arrow): read manifest lists into Arrow with arrow-avro - #3631

Merged
kevinjqliu merged 3 commits into
apache:mainfrom
mbutrovich:manifest-list-arrow
Nov 6, 2026
Merged

kevinjqliu merged 3 commits into
apache:mainfrom
mbutrovich:manifest-list-arrow

Conversation

@mbutrovich

@mbutrovich mbutrovich commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Which issue does this PR close?

What changes are included in this PR?

Adds iceberg::arrow::read_manifest_list, which decodes a manifest list into a RecordBatch with arrow-avro, following read_manifest_entries from #3388. The binding follows in a separate PR.

Are these changes tested?

Yes, with unit tests in arrow/manifest.rs and a doctest. test_manifest_lists_written_by_java compares the result with ManifestList::parse_with_version on the two Java-written fixtures in testdata/manifests_lists.

AI Disclosure

I wrote this PR with help from Claude but understand and support the core approach, implementation, and test coverage.

@mbutrovich
mbutrovich marked this pull request as ready for review November 5, 2026 15:13

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

most of the changes are isolated to crates/iceberg/src/arrow/. the crates/iceberg/src/spec/ changes are all just refactor

Comment on lines +180 to +189
/// Field ID of `manifest_entry.data_file`.
pub(crate) const DATA_FILE_FIELD_ID: i32 = 2;
/// Field ID of `manifest_entry.sequence_number`.
pub(crate) const SEQUENCE_NUMBER_FIELD_ID: i32 = 3;
/// Field ID of `manifest_entry.file_sequence_number`.
pub(crate) const FILE_SEQUENCE_NUMBER_FIELD_ID: i32 = 4;
/// Field ID of `data_file.partition`.
pub(crate) const DATA_FILE_PARTITION_FIELD_ID: i32 = 102;
/// Field ID of `data_file.content`.
pub(crate) const DATA_FILE_CONTENT_FIELD_ID: i32 = 134;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, ty for the refactor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see manifest_list has a _const_schema.rs file, maybe we should do the same. thats a bigger refactor, lets not do it here

"arrow-avro split the manifest into more than one batch"
));
}
// v1 manifests have no content or sequence number columns, which v2+

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meta question. what do you think is the best way to deal with different manifest versions in terms of arrow schema?

for example, say we have a table that is upgraded from v1 all the way to v4. how should we represent all the fields? should the arrow schema be a superset of all the versions combined?

and then how do we validate the integrity of the data? for example, "field x should not exist in v1 schema"?

just curious, i feel like we have to answer this eventually 😄

}

let Some(batch) = reader.next() else {
let Some(batch) = only_batch(reader, invalid_manifest)? else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might want to revisit this once the data reach a certain size

@kevinjqliu
kevinjqliu added this pull request to the merge queue Nov 6, 2026
Merged via the queue into apache:main with commit 5370b61 Nov 6, 2026
25 checks passed
@mbutrovich
mbutrovich deleted the manifest-list-arrow branch November 6, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants