apache / apache/iceberg

Catalog name ignored with Hive Metastore

Open
#14,860 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
9.2k
Forks
3.5k
Avg merge
2d 16h
Merged PRs (30d)
129

Description

### Apache Iceberg version

1.10.0 (latest release)

### Query engine

None

### Please describe the bug 🐞

In the `HiveCatalog` implementation the Catalog name is ignored. For example in the `tableExists` method there is the following code:

`Table table = clients.run(client -> client.getTable(database, tableName));`

If the HiveCatalog used the Catalog name provided then the code would be:

`Table table = clients.run(client -> client.getTable(name, database, tableName));`

This change reflects that IMetaStoreClient code has two versions of the getTable method, one of which takes a Catalog name. Apologies if this is a duplicate issue, or there is a documented reason why Catalog names are not supported in HiveCatalog.

Raised as a bug rather than a feature request as the API takes a Catalog name so the expectation is that it will use it as expected.

### Willingness to contribute

- [ ] I can contribute a fix for this bug independently
- [x] 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

Contributor guide

Open the contributing guide

Research direction

Start in the HiveCatalog implementation at the tableExists method and compare its getTable call with the two IMetaStoreClient signatures described in the issue. Trace how the Catalog name is supplied there, then verify that the catalog-aware lookup is used and that the existing table-existence behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.