Skip to content

feat: add PrimitiveType::Variant to iceberg spec#2423

Open
Shekharrajak wants to merge 3 commits intoapache:mainfrom
Shekharrajak:feat/variant-primitive-type
Open

feat: add PrimitiveType::Variant to iceberg spec#2423
Shekharrajak wants to merge 3 commits intoapache:mainfrom
Shekharrajak:feat/variant-primitive-type

Conversation

@Shekharrajak
Copy link
Copy Markdown
Contributor

@Shekharrajak Shekharrajak commented May 10, 2026

Which issue does this PR close?

#2411

What changes are included in this PR?

• Adds PrimitiveType::Variant to the Iceberg type system (spec v3)
• Implements Display — serializes as "variant" per Iceberg spec
• Implements compatible() — returns false for all literals (no scalar predicate against Variant)
• Adds Avro mapping — AvroSchema::Bytes (opaque, no natural Avro equivalent)
• Adds PrimitiveType::Variant to the canonical primitive_type_serde test
• Adds targeted tests: Display output, serde round-trip, literal incompatibility

Are these changes tested?

Unit tests

What this PR does NOT do (follow-up):

• Arrow schema mapping (DataType::Struct + VariantType extension)
• arrow_field_to_type reverse mapping
• Metrics evaluator statistics suppression
• Iceberg scan/write path support

@Shekharrajak Shekharrajak force-pushed the feat/variant-primitive-type branch from 6c6f490 to 6265b88 Compare May 10, 2026 06:21
@Shekharrajak Shekharrajak force-pushed the feat/variant-primitive-type branch from 6265b88 to 3c86956 Compare May 10, 2026 06:22
@Shekharrajak
Copy link
Copy Markdown
Contributor Author

This have some overlap with #2188 but its is minimal start.

@Shekharrajak Shekharrajak changed the title feat: [DRAFT] add PrimitiveType::Variant to iceberg spec feat: add PrimitiveType::Variant to iceberg spec May 10, 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