Skip to content

[iceberg] Support the variant type in Iceberg schema type conversion#8795

Open
plusplusjiajia wants to merge 1 commit into
apache:masterfrom
plusplusjiajia:gh-iceberg-variant
Open

[iceberg] Support the variant type in Iceberg schema type conversion#8795
plusplusjiajia wants to merge 1 commit into
apache:masterfrom
plusplusjiajia:gh-iceberg-variant

Conversation

@plusplusjiajia

@plusplusjiajia plusplusjiajia commented Jul 22, 2026

Copy link
Copy Markdown
Member

Purpose

Map the Iceberg variant type in IcebergDataField so a schema with a VariantType
column converts between Paimon and Iceberg types both ways; before this it threw
Unsupported data type: VariantType.

variant is an Iceberg v3 type needing row lineage, which Paimon's own Iceberg metadata
generation does not support, so a schema containing it is rejected during metadata
generation (as an older release already did) rather than emitting unreadable metadata.
Also fixes a pre-existing bug: an array's element-required flag was taken from the
array's nullability instead of the element type's.

Note

Rejection happens during post-commit metadata generation (a property of Paimon's
Iceberg callback, unchanged from the prior Unsupported data type behavior), not at
write validation.

Tests

  • IcebergDataFieldTest: variant forward/reverse conversion, JSON round-trip, array
    element-nullability.
  • IcebergCompatibilityTest: rejects a schema containing variant.
  • RESTCatalogTest#testCreateIcebergTable: variant column round-trips through create + get.

@plusplusjiajia plusplusjiajia changed the title [iceberg] Support the v3 variant type with row lineage and REST catalog [WIP][iceberg] Support the v3 variant type with row lineage and REST catalog Jul 23, 2026
@plusplusjiajia plusplusjiajia changed the title [WIP][iceberg] Support the v3 variant type with row lineage and REST catalog [iceberg] Support the variant type in Iceberg schema type conversion Jul 23, 2026
@plusplusjiajia
plusplusjiajia marked this pull request as ready for review July 23, 2026 13:31
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