mchades commented on code in PR #14040:
URL: https://github.com/apache/gravitino/pull/14040#discussion_r4335211334


##########
api/src/main/java/org/apache/gravitino/rel/TableCatalog.java:
##########
@@ -288,10 +288,11 @@ Table createTable(
    * @param changes Table changes to apply to the table.
    * @return The updated table metadata.
    * @throws NoSuchTableException If the table does not exist.
+   * @throws TableAlreadyExistsException If the new name is already used by 
another table.
    * @throws IllegalArgumentException If the change is rejected by the 
implementation.
    */
   Table alterTable(NameIdentifier ident, TableChange... changes)
-      throws NoSuchTableException, IllegalArgumentException;
+      throws NoSuchTableException, TableAlreadyExistsException, 
IllegalArgumentException;

Review Comment:
   These exceptions are all unchecked: they ultimately extend 
`RuntimeException`. Declaring them in `throws` documents the contract without 
requiring callers to catch or declare them, or implementations to change their 
method signatures.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to