Skip to content

fix(hms): use get_table_req for Hive 4 metastore compatibility - #3187

Merged
blackmwk merged 1 commit into
apache:mainfrom
kevinjqliu:hms-hive4-get-table-req
Sep 10, 2026
Merged

fix(hms): use get_table_req for Hive 4 metastore compatibility#3187
blackmwk merged 1 commit into
apache:mainfrom
kevinjqliu:hms-hive4-get-table-req

Conversation

@kevinjqliu

@kevinjqliu kevinjqliu commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

What changes are included in this PR?

Follow up to #3174. Debian Bullseye reached EOL and broke apt-get in the apache/hive:3.1.3 image we use for HMS integration tests. #3174 worked around it by downloading the jars without apt, but the base image is still EOL. pyiceberg hit the same thing and moved to apache/hive:4.2.1 in apache/iceberg-python#3924. This does the same here.

Moving to Hive 4 exposed a real bug: Hive 4.0.1 dropped the get_table thrift method, so the HMS catalog fails with Invalid method name: 'get_table' against any Hive 4 metastore.

  • Switch load_table, table_exists, and rename_table to get_table_req. It exists since Hive 2.3, which is the IDL hive_metastore is generated from, so nothing we could talk to before stops working.
  • Bump the test metastore to apache/hive:4.2.1, same Dockerfile as pyiceberg. 3.1.3 still serves get_table, so CI could never catch this.

Are these changes tested?

Existing HMS cases in the catalog suite (crates/catalog/loader/tests), now running against Hive 4.2.1.

Locally, the 21 HMS cases pass against both 4.2.1 and 3.1.3. Without the code change they fail against 4.2.1 with the error above.

AI Disclosure

Written with Claude Code, reviewed by me.

Hive 4.0.1 removed the `get_table` thrift method, so the HMS catalog fails
with `Invalid method name: 'get_table'` against any Hive 4 metastore.
Switch `load_table`, `table_exists`, and `rename_table` to `get_table_req`,
which exists in every Hive release since 2.3 (the IDL the `hive_metastore`
crate is generated from), so older metastores keep working.

Move the integration test metastore from `apache/hive:3.1.3` (Debian
Bullseye, EOL) to `apache/hive:4.2.1` so CI exercises a Hive 4 server,
mirroring apache/iceberg-python#3924.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 10, 2026 06:56
@kevinjqliu kevinjqliu changed the title fix(hms): use get_table_req for Hive 4 metastore compatibility fix(hms): use get_table_req for Hive 4 metastore compatibility Sep 10, 2026
Comment thread dev/hms/Dockerfile

ENV AWSSDK_VERSION=2.20.18
ENV HADOOP_VERSION=3.1.0
FROM apache/hive:4.2.1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mirrors change from pyiceberg

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved blocking issues were identified.

Pull request overview

Updates HMS integration for Hive 4 compatibility.

Changes:

  • Replaces get_table with get_table_req.
  • Upgrades the test metastore to Hive 4.2.1.
File summaries
File Summary
dev/hms/Dockerfile Updates the Hive test image and dependencies.
crates/catalog/hms/src/catalog.rs Uses the compatible request-based table API.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@blackmwk blackmwk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kevinjqliu for this fix!

@blackmwk
blackmwk merged commit 4aa55ba into apache:main Sep 10, 2026
21 checks passed
@kevinjqliu
kevinjqliu deleted the hms-hive4-get-table-req branch September 10, 2026 15:02
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.

HMS catalog fails against Hive 4 metastores: get_table thrift method was removed

3 participants