This is an automated email from the ASF dual-hosted git repository.
emaynard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 2608f4d Refactor BasePolarisCatalog to use Iceberg's
BadRequestException instead of jakarta (#323)
2608f4d is described below
commit 2608f4d43054d2a980e0c067d44ba0a3b1b97fdc
Author: Dennis Huo <[email protected]>
AuthorDate: Wed Sep 25 21:52:20 2024 -0700
Refactor BasePolarisCatalog to use Iceberg's BadRequestException instead of
jakarta (#323)
It looks like the jakarta flavor inadvertently got added by someone's IDE
and now
there's a needless mix of jakarta/iceberg BadRequestException
---
.../java/org/apache/polaris/service/catalog/BasePolarisCatalog.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/polaris-service/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
b/polaris-service/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
index 3d926fb..5e46d60 100644
---
a/polaris-service/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
+++
b/polaris-service/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
@@ -23,7 +23,6 @@ import com.google.common.base.Joiner;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
-import jakarta.ws.rs.BadRequestException;
import java.io.Closeable;
import java.io.IOException;
import java.net.URI;
@@ -53,6 +52,7 @@ import org.apache.iceberg.catalog.Namespace;
import org.apache.iceberg.catalog.SupportsNamespaces;
import org.apache.iceberg.catalog.TableIdentifier;
import org.apache.iceberg.exceptions.AlreadyExistsException;
+import org.apache.iceberg.exceptions.BadRequestException;
import org.apache.iceberg.exceptions.CommitFailedException;
import org.apache.iceberg.exceptions.ForbiddenException;
import org.apache.iceberg.exceptions.NamespaceNotEmptyException;
@@ -1403,7 +1403,7 @@ public class BasePolarisCatalog extends
BaseMetastoreViewCatalog
if (!isUnderParentLocation(
URI.create(metadata.metadataFileLocation()),
URI.create(metadata.location() + "/metadata").normalize())) {
- throw new org.apache.iceberg.exceptions.BadRequestException(
+ throw new BadRequestException(
"Metadata location %s is not allowed outside of table location %s",
metadata.metadataFileLocation(), metadata.location());
}
@@ -1708,7 +1708,7 @@ public class BasePolarisCatalog extends
BaseMetastoreViewCatalog
// some entities cannot be renamed
case PolarisMetaStoreManager.ReturnStatus.ENTITY_CANNOT_BE_RENAMED:
- throw new BadRequestException("Cannot rename built-in object " +
leafEntity.getName());
+ throw new BadRequestException("Cannot rename built-in object %s",
leafEntity.getName());
// some entities cannot be renamed
default: