Skip to content

Commit 75e9da4

Browse files
authored
[core] Support in memory catalog for test RESTCatalog (#5154)
1 parent 309c8da commit 75e9da4

File tree

7 files changed

+526
-284
lines changed

7 files changed

+526
-284
lines changed

paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public void alterDatabase(String name, List<PropertyChange> changes, boolean ign
216216
if (changes == null || changes.isEmpty()) {
217217
return;
218218
}
219-
alterDatabaseImpl(name, changes);
219+
this.alterDatabaseImpl(name, changes);
220220
} catch (DatabaseNotExistException e) {
221221
if (ignoreIfNotExists) {
222222
return;

paimon-core/src/main/java/org/apache/paimon/catalog/FileSystemCatalog.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ protected void dropDatabaseImpl(String name) {
9494
}
9595

9696
@Override
97-
protected void alterDatabaseImpl(String name, List<PropertyChange> changes) {
97+
protected void alterDatabaseImpl(String name, List<PropertyChange> changes)
98+
throws DatabaseNotExistException {
9899
throw new UnsupportedOperationException("Alter database is not supported.");
99100
}
100101

paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ public void alterDatabase(String name, List<PropertyChange> changes, boolean ign
241241
request,
242242
AlterDatabaseResponse.class,
243243
restAuthFunction);
244-
if (response.getUpdated().isEmpty()) {
245-
throw new IllegalStateException("Failed to update properties");
246-
}
244+
// if (response.getUpdated().isEmpty()) {
245+
// throw new IllegalStateException("Failed to update properties");
246+
// }
247247
} catch (NoSuchResourceException e) {
248248
if (!ignoreIfNotExists) {
249249
throw new DatabaseNotExistException(name);

0 commit comments

Comments
 (0)