Skip to content

Hive: Align VARIANT type mapping with Hive 4.2 support (HIVE-29184) #17396

Description

@Mukvin

Apache Iceberg version

1.11.0 (latest release)

Query engine

Spark

Please describe the bug 🐞

Hive 4.2 introduced basic VARIANT support via HIVE-29184, but Iceberg's
HiveSchemaUtil still maps Iceberg VARIANT to "unknown".

Problem

  • Current mapping in HiveSchemaUtil.convertToTypeString returns "unknown" for Iceberg VARIANT.
  • This diverges from Hive 4.2 capability and from user expectation in Hive environments where VARIANT is supported.

Proposal

  • Update Hive schema conversion for Iceberg VARIANT to return "variant".
  • Update unit tests accordingly.

Scope

  • hive-metastore schema conversion only.
  • No change to non-VARIANT mappings.

References

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions