LuciferYang opened a new pull request, #56390:
URL: https://github.com/apache/spark/pull/56390
### What changes were proposed in this pull request?
This PR updates `HiveClientImpl.getTablesByName` to preserve Spark's
existing behavior when Hive 4.2 throws `NoSuchObjectException` for missing
table names in a batch lookup.
On that specific exception, Spark falls back to single-table lookups and
returns only the tables that exist. Other metastore errors continue to be
reported through the existing `UNABLE_TO_FETCH_HIVE_TABLES` path.
### Why are the changes needed?
This is a follow-up for SPARK-57263. Hive 4.2 changed the effective client
path for `getTableObjectsByName`: in the default catalog path it may call
`getTable` for each requested table name, so a missing table can fail the whole
batch.
Spark's `getTablesByName` contract is to return existing tables and ignore
missing names. The fallback keeps that contract while limiting the
compatibility handling to the missing-table case.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
- `git diff --check`
- GitHub Actions on LuciferYang/spark run 27182854479:
- `Run / Build modules: hive - other tests`: success
- `Run / Build modules: hive - slow tests`: success
- `Run / Build modules: api, catalyst, hive-thriftserver`: success
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]