VARIANT does not work with older <= 4.1 HMS versions.

Open
#19,072 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java, spark
Domain
database

Research direction

Start from the VARIANT handling added for issue #15220 and the Hive metastore table-creation path that sends column types to HMS. Reproduce with HMS 3.0 by creating a VARIANT table and confirm the InvalidObjectException: Invalid column type: unknown failure. The open question is the compatibility contract: whether to send binary or gate it behind a catalog config, so done means an agreed mapping and a tested fallback for older HMS versions.

Written by the indexing model from the issue text.

Description

bug
Apache Iceberg version

1.12.0 (latest release)

Query engine

Spark

Please describe the bug 🐞

This is a follow up on https://github.com/apache/iceberg/issues/15220
We tried creating a table with VARIANT using a HMS 3.0 and we got this error message:

org.apache.iceberg.exceptions.ValidationException: Invalid hive object for <table>
Caused by: InvalidObjectException(message: Invalid column type: unknown)

I had a chat with @nssalian about this as well and apparently its because HMS validates the column types on the server.

Question: What should Iceberg send to older HMS for variant columns? Should we go with "binary" ? Or should we perhaps add a hive.metastore.variant-supported catalog config to use "binary" when enabled and "variant" otherwise?

cc @pvary @RussellSpitzer

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
Dominant language
Java
Stars
9.5k
Forks
3.7k
Avg merge
2d 2h
Merged PRs (30d)
170

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/iceberg

All issues in apache/iceberg

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.