Skip to content

Commit

Permalink
fix RESTCatalog
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-024 committed Dec 13, 2024
1 parent 8cb2d26 commit f2ed305
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.paimon.rest.exceptions.NoSuchResourceException;
import org.apache.paimon.rest.requests.AlertDatabaseRequest;
import org.apache.paimon.rest.requests.CreateDatabaseRequest;
import org.apache.paimon.rest.requests.DropDatabaseRequest;
import org.apache.paimon.rest.responses.AlertDatabaseResponse;
import org.apache.paimon.rest.responses.ConfigResponse;
import org.apache.paimon.rest.responses.CreateDatabaseResponse;
Expand Down Expand Up @@ -167,11 +166,12 @@ public Database getDatabase(String name) throws DatabaseNotExistException {
@Override
public void dropDatabase(String name, boolean ignoreIfNotExists, boolean cascade)
throws DatabaseNotExistException, DatabaseNotEmptyException {
DropDatabaseRequest request = new DropDatabaseRequest(ignoreIfNotExists, cascade);
try {
client.delete(resourcePaths.database(name), request, headers());
client.delete(resourcePaths.database(name), headers());
} catch (NoSuchResourceException e) {
throw new DatabaseNotExistException(name);
if(!ignoreIfNotExists) {
throw new DatabaseNotExistException(name);
}
}
}

Expand Down

0 comments on commit f2ed305

Please sign in to comment.