Skip to content

Use Iceberg-Rust for parsing the ManifestList and Manifests #2004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

Fokko
Copy link
Contributor

@Fokko Fokko commented May 14, 2025

Rationale for this change

This replaces the Cython implementation for reading Avro with Iceberg-Rust. This would greatly simplify the PyIceberg project since we don't have to publish Python wheels anymore.

Are these changes tested?

Are there any user-facing changes?

@Fokko Fokko changed the title Fd rust Use Iceberg-Rust for parsing the ManifestList and Manifests May 15, 2025
@Fokko
Copy link
Contributor Author

Fokko commented Jun 26, 2025

@roeap Thanks, your patch fixed correctly passing through the 102: partition field 🥳

Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

looks like we're waiting for apache/iceberg-rust#1328 to finalize, which is dependent on apache/iceberg-rust#1482 :)

@@ -357,7 +357,7 @@ def test_write_empty_manifest() -> None:

@pytest.mark.parametrize("format_version", [1, 2])
def test_write_manifest(
generated_manifest_file_file_v1: str, generated_manifest_file_file_v2: str, format_version: TableVersion
generated_manifest_file_file_v1: str, generated_manifest_file_file_v2: str, format_version: TableVersion, test_schema: Schema
Copy link
Contributor

Choose a reason for hiding this comment

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

nit use test_partition_spec too

@yogevyuval
Copy link

@Fokko This is awesome! thanks for your work on this one.
Do we expect any performance/memory differences with reading it with the rust module?

@Fokko
Copy link
Contributor Author

Fokko commented Jul 8, 2025

@yogevyuval Thanks for asking, and yes, I do expect performance impact since just a part of the deserialization is cythonized. With this change, much more is pushed into Rust. This will also reduce the GIL pressure since we don't have to build the readers anymore :)

I left this PR small to focus on the essentials, but once this is in, we can also clean up a LOT of code 👍

@yogevyuval
Copy link

@yogevyuval Thanks for asking, and yes, I do expect performance impact since just a part of the deserialization is cythonized. With this change, much more is pushed into Rust. This will also reduce the GIL pressure since we don't have to build the readers anymore :)

I left this PR small to focus on the essentials, but once this is in, we can also clean up a LOT of code 👍

Interesting, we have quite a bit of concurrency going on so curious to see the results. Once apache/iceberg-rust#1328 gets merged and release i'll try and create some basic benchmarks and share the results

Fokko added a commit to Fokko/iceberg-python that referenced this pull request Jul 31, 2025
While working on apache#2004 I've noticed some small discrepancies
that I think would be good to address in a separate PR.
Fokko added 3 commits July 31, 2025 21:40
While working on apache#2004 I've noticed some small discrepancies
that I think would be good to address in a separate PR.
Fokko added a commit to Fokko/iceberg-python that referenced this pull request Jul 31, 2025
While working on apache#2004 I've noticed some small discrepancies
that I think would be good to address in a separate PR.
Fokko added a commit that referenced this pull request Aug 4, 2025
While working on #2004 I've
noticed some small discrepancies that I think would be good to address
in a separate PR.

<!--
Thanks for opening a pull request!
-->

<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->

# Rationale for this change

# Are these changes tested?

# Are there any user-facing changes?

<!-- In the case of user-facing changes, please add the changelog label.
-->

---------

Co-authored-by: Kevin Liu <kevin.jq.liu@gmail.com>
gabeiglio pushed a commit to Netflix/iceberg-python that referenced this pull request Aug 13, 2025
While working on apache#2004 I've
noticed some small discrepancies that I think would be good to address
in a separate PR.

<!--
Thanks for opening a pull request!
-->

<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->

# Rationale for this change

# Are these changes tested?

# Are there any user-facing changes?

<!-- In the case of user-facing changes, please add the changelog label.
-->

---------

Co-authored-by: Kevin Liu <kevin.jq.liu@gmail.com>
@Fokko
Copy link
Contributor Author

Fokko commented Aug 21, 2025

Waiting for this one apache/iceberg-rust#1587 as it will make it much easier for PyIceberg to read both versions (and less work on the PyIceberg side :)

@kevinjqliu kevinjqliu mentioned this pull request Aug 22, 2025
3 tasks
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.

3 participants