This is an automated email from the ASF dual-hosted git repository.
etudenhoefner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new c98d0d0d4e Core: Move namespace/table/view validation into try-catch
block (#11960)
c98d0d0d4e is described below
commit c98d0d0d4e1a542923f1239c38430506eeb564bc
Author: dongwang <[email protected]>
AuthorDate: Tue Jan 14 17:44:21 2025 +0800
Core: Move namespace/table/view validation into try-catch block (#11960)
---
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
b/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
index 0a78210425..d98dc99495 100644
--- a/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
+++ b/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
@@ -438,9 +438,9 @@ public class RESTSessionCatalog extends
BaseViewSessionCatalog
@Override
public boolean tableExists(SessionContext context, TableIdentifier
identifier) {
Endpoint.check(endpoints, Endpoint.V1_TABLE_EXISTS);
- checkIdentifierIsValid(identifier);
try {
+ checkIdentifierIsValid(identifier);
client.head(paths.table(identifier), headers(context),
ErrorHandlers.tableErrorHandler());
return true;
} catch (NoSuchTableException e) {
@@ -659,9 +659,9 @@ public class RESTSessionCatalog extends
BaseViewSessionCatalog
@Override
public boolean namespaceExists(SessionContext context, Namespace namespace) {
Endpoint.check(endpoints, Endpoint.V1_NAMESPACE_EXISTS);
- checkNamespaceIsValid(namespace);
try {
+ checkNamespaceIsValid(namespace);
client.head(
paths.namespace(namespace), headers(context),
ErrorHandlers.namespaceErrorHandler());
return true;
@@ -1233,9 +1233,9 @@ public class RESTSessionCatalog extends
BaseViewSessionCatalog
@Override
public boolean viewExists(SessionContext context, TableIdentifier
identifier) {
Endpoint.check(endpoints, Endpoint.V1_VIEW_EXISTS);
- checkViewIdentifierIsValid(identifier);
try {
+ checkViewIdentifierIsValid(identifier);
client.head(paths.view(identifier), headers(context),
ErrorHandlers.viewErrorHandler());
return true;
} catch (NoSuchViewException e) {