feat(spec): add unknown datatype support#2773
Draft
manuzhang wants to merge 5 commits into
Draft
Conversation
Reject schema types that require a newer table format and update the DataFusion catalog registration path to request v3 only when the converted schema needs it. This keeps ordinary CREATE TABLE defaults on v2 while allowing timestamp_ns schemas to pass validation. Co-authored-by: Codex <codex@openai.com>
Move the table-format comparison behind PrimitiveType so schema validation asks the primitive for the required format version only when the requested format does not support it. Co-authored-by: Codex <codex@openai.com>
Add Iceberg unknown type parsing and conversions across schema, Arrow, Avro, HMS, and Glue paths. Reject non-null defaults for unknown fields and make set predicate formatting deterministic for stable tests. Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
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.
Summary
Add
PrimitiveType::Unknownsupport across the Iceberg Rust type system.This includes parsing, serialization, Arrow and Avro conversion, schema validation, predicate display stability, and catalog conversion behavior for unsupported external systems. The branch also gates table metadata so schemas requiring v3-only primitive types are rejected for v1/v2 tables unless the table format is upgraded.
Testing
cargo fmt --all -- --checkcargo test -p iceberg --lib spec::datatypescargo test -p iceberg --lib test_create_null_array_rejects_non_null_literalcargo test -p iceberg --lib test_unknown_type_deserialization_rejects_non_null_defaultcargo test -p iceberg --lib test_unknown_type_must_be_optional_with_null_defaultscargo test -p iceberg --lib expr::predicate::testsmake check-public-api