feat: remove manual REST update_schema fallback and upgrade to iceber… - #7
Conversation
495c229 to
0439b1e
Compare
d16da1f to
4ac9c64
Compare
|
@manudiv16 do you want us to look at this? |
The upgrade from iceberg-rust 0.7 to 0.10 changed how nested types
are represented when loaded from table metadata. The Display impl for
Type::Struct produces 'struct<field1: type1, ...>' while the protobuf
decoder uses full JSON objects like '{"type":"struct","fields":[...]}'.
This mismatch caused the schema compatibility check to detect breaking
changes on every startup, even when the schemas were identical.
Add iceberg_type_to_json_string() to convert iceberg::spec::Type back
to the same JSON format used by the protobuf decoder's iceberg_type_value(),
ensuring consistent round-trip through TableSchema and Iceberg Schema.
|
I pushed this before running the full test suite. The library upgrade (iceberg 0.7 → 0.10, Arrow/Parquet 54 → 58) turned out to require significantly more changes than initially expected, so I have been working through the fixes. The latest commit addresses a schema round-trip mismatch caused by the new iceberg Display impl for nested types. |
Test verificationAll tests in the plan were executed locally from the repository root before opening this PR: # Static checks
cargo fmt --all --check
cargo check --workspace --all-targets
cargo clippy --workspace --all-targets -- -D warnings
# Unit + integration tests
cargo test --workspace --no-fail-fast
# Iceberg E2E (correctness + load profiles)
scripts/e2e-docker-iceberg.sh
K2I_E2E_LOAD_MESSAGES=100000 scripts/e2e-docker-iceberg-load.shContextThis PR introduces three new unit tests in
The Rust 1.94 MSRV bump and the Arrow 54→58 / Parquet 54→58 / Iceberg 0.7→0.10 upgrade also touches the write path ( Verified
|
Fixes lint failure — recent changes to iceberg_type_to_json_string and its tests weren't formatted, breaking cargo fmt --check in CI.
|
Full review of this PR: read the whole diff, checked out the branch locally, ran the unit suite, clippy, the Docker e2e suites (including two not in the test plan), and wrote targeted integration probes against a live Blocking1. CI is red:
|
rdkafka-sys 4.10.0 bundles librdkafka 2.12.1, which requires curl/curl.h at build time. semver-check.yml already installs libcurl4-openssl-dev; test.yml did not, so every job behind Check & Lint failed before running. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Restore the hard error for non-empty files_to_remove in commit_snapshot. The debug_assert compiled out in release builds, so a compaction commit against a REST catalog would fast_append the merged file while leaving the source files live (duplicate rows), and report files_removed as if the removals had happened. - Map catalog errors by ErrorKind again instead of message text. The 0.10 ErrorKind enum still exposes TableNotFound and CatalogCommitConflicts; the string match misclassified namespace-not-found responses (their message contains "does not exist") and tied CAS-conflict detection to upstream message wording. - Restore the bounded manifest-list cache so the transaction log records the real manifest-list path for committed snapshots instead of the synthesized fallback. - Emit fixed[n] from iceberg_type_to_json_string instead of collapsing fixed-width types to binary, matching parse_iceberg_type. - Document why update_schema ignores expected_schema_id and re-add the removals/manifest-cache regression test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed two commits on top of this branch addressing the review findings (maintainer edits):
Verification on the combined branch: None of the upgrade work itself changed — this only restores the guardrails around it. |
Summary
This change upgrades the official Apache Iceberg Rust client from 0.7 to 0.10.0 and the Arrow/Parquet ecosystem from 54 to 58, then removes the temporary standalone REST
update_schemafallback that was introduced in PR #6.Key improvements
OfficialRestCommitter::update_schemanow delegates toTransaction::update_schema()via the officialiceberg-rust0.10.0 API instead of a hand-rolled REST path.TransactionCAS insidecommit_append_with_catalog, removing the duplicate caller-side snapshot precondition check.iceberg-rustrelease.Implementation
crates/k2i-core/src/iceberg/official.rs— delegatesupdate_schemato the officialTransactionAPI, deletes the standalone REST path, simplifies schema/TableInfo conversion, and maps errors by message (ErrorKindvariants changed in 0.10).crates/k2i-core/src/iceberg/writer.rs— switches Parquet writer toset_max_row_group_row_count(Some(...))for the parquet 58 API.Cargo.toml/Cargo.lock— bumpicebergandiceberg-catalog-restto 0.10, Arrow/Parquet to 58, and raiserust-versionto 1.94.CHANGELOG.md,README.md,claude.md,docs/quickstart.md,docs/deployment.md,Dockerfile, andscripts/security-audit.sh— update documented minimum Rust version and dependency versions.Requirements
iceberg0.10.0 and the updated AWS SDK dependency graph.Test plan
cargo fmt --all --checkcargo check --workspace --all-targetscargo test --workspace --no-fail-fastcargo clippy --workspace --all-targets -- -D warningsscripts/e2e-docker-iceberg.shK2I_E2E_LOAD_MESSAGES=100000 scripts/e2e-docker-iceberg-load.shCompatibility
iceberg-rusttransaction path; all auth, route, and warehouse-prefix negotiation is handled by the official client.