Skip to content

fix: handle missing schema_id in ObjectCache for Iceberg v1 tables#2279

Closed
vovacf201 wants to merge 1 commit intoapache:mainfrom
risingwavelabs:fix/handle-missing-schema-id-v1
Closed

fix: handle missing schema_id in ObjectCache for Iceberg v1 tables#2279
vovacf201 wants to merge 1 commit intoapache:mainfrom
risingwavelabs:fix/handle-missing-schema-id-v1

Conversation

@vovacf201
Copy link

Which issue does this PR close?

N/A (discovered in production via panic stack trace)

What changes are included in this PR?

ObjectCache::get_manifest_list panics when building the cache key for snapshots that don't have a schema_id set. This happens with Iceberg v1 format tables, where schema_id is optional on snapshots.
The fix falls back to table_metadata.current_schema_id() when snapshot.schema_id() returns None, consistent with how Snapshot::schema() resolves the schema elsewhere in the codebase.

Are these changes tested?

Existing test_get_manifest_list_and_manifest_from_default_cache covers the cache path but uses v2 metadata where schema_id is always present.

ObjectCache::get_manifest_list panics on .unwrap() when building the
cache key for snapshots without a schema_id (Iceberg v1 format tables
don't require this field). Fall back to
table_metadata.current_schema_id() when snapshot.schema_id() is None.
@vovacf201 vovacf201 force-pushed the fix/handle-missing-schema-id-v1 branch from 0c5bcc7 to 1ba883e Compare March 24, 2026 09:36
@vovacf201 vovacf201 closed this Mar 24, 2026
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.

1 participant