Skip to content

feat(spec): add unknown datatype support#2773

Draft
manuzhang wants to merge 5 commits into
apache:mainfrom
manuzhang:add-unknown-datatype
Draft

feat(spec): add unknown datatype support#2773
manuzhang wants to merge 5 commits into
apache:mainfrom
manuzhang:add-unknown-datatype

Conversation

@manuzhang

@manuzhang manuzhang commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Add PrimitiveType::Unknown support 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 -- --check
  • cargo test -p iceberg --lib spec::datatypes
  • cargo test -p iceberg --lib test_create_null_array_rejects_non_null_literal
  • cargo test -p iceberg --lib test_unknown_type_deserialization_rejects_non_null_default
  • cargo test -p iceberg --lib test_unknown_type_must_be_optional_with_null_defaults
  • cargo test -p iceberg --lib expr::predicate::tests
  • make check-public-api

manuzhang and others added 5 commits July 6, 2026 15:28
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>
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