jerryshao commented on code in PR #6765: URL: https://github.com/apache/gravitino/pull/6765#discussion_r2019424462
########## catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java: ########## @@ -141,7 +143,8 @@ public Model registerModel(NameIdentifier ident, String comment, Map<String, Str .build(); try { - store.put(model, false /* overwrite */); + /* overwrite */ + store.put(model, false); Review Comment: The original code comment is on purpose, please revert it back. ########## catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java: ########## @@ -259,6 +262,72 @@ public boolean deleteModelVersion(NameIdentifier ident, String alias) { return internalDeleteModelVersion(modelVersionIdent); } + /** {@inheritDoc} */ + @Override + public Model alterModel(NameIdentifier ident, ModelChange... changes) + throws NoSuchModelException, IllegalArgumentException { + try { + if (!store.exists(ident, Entity.EntityType.MODEL)) { + throw new NoSuchModelException("Model %s does not exist", ident); + } + } catch (IOException ioe) { + throw new RuntimeException("Failed to load model " + ident, ioe); + } + + try { + ModelEntity updatedModelEntity = + store.update( + ident, + ModelEntity.class, + Entity.EntityType.MODEL, + e -> updateModelEntity(ident, e, changes)); + + return toModelImpl(updatedModelEntity); + + } catch (IOException ioe) { + throw new RuntimeException("Failed to load model " + ident, ioe); Review Comment: I think you should update to "Failed to alter mode ..." -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org