This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new c211731f81 [core] Resolve hms Permission.NotAllow error (#5486)
c211731f81 is described below
commit c211731f815382ed043739129ebfa1b998dafb42
Author: gavin9402 <[email protected]>
AuthorDate: Mon Apr 28 10:16:50 2025 +0800
[core] Resolve hms Permission.NotAllow error (#5486)
---
.../src/main/java/org/apache/paimon/hive/HiveCatalog.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java
b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java
index 1ef319fb31..c802e42cdd 100644
---
a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java
+++
b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java
@@ -1308,7 +1308,8 @@ public class HiveCatalog extends AbstractCatalog {
fileIO, new SerializableHiveConf(hiveConf), clientClassName,
options, warehouse);
}
- public Table getHmsTable(Identifier identifier) throws
TableNotExistException {
+ public Table getHmsTable(Identifier identifier)
+ throws TableNotExistException, TableNoPermissionException {
try {
return clients.run(
client ->
@@ -1317,6 +1318,9 @@ public class HiveCatalog extends AbstractCatalog {
} catch (NoSuchObjectException e) {
throw new TableNotExistException(identifier);
} catch (TException e) {
+ if (e.getMessage().contains("Permission.NotAllow")) {
+ throw new TableNoPermissionException(identifier, e);
+ }
throw new RuntimeException(
"Cannot determine if table " + identifier.getFullName() +
" is a paimon table.",
e);