snuyanzin commented on code in PR #25810: URL: https://github.com/apache/flink/pull/25810#discussion_r1894341087
########## flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java: ########## @@ -1026,20 +1026,86 @@ void createTemporarySystemFunction( * <p>If a permanent table with a given path exists, it will be used from now on for any queries * that reference this path. * + * @param path The given path under which the temporary table will be dropped. See also the + * {@link TableEnvironment} class description for the format of the path. * @return true if a table existed in the given path and was removed */ boolean dropTemporaryTable(String path); + /** + * Drops a table registered in the given path. + * + * <p>This method can only drop permanent objects. Temporary objects can shadow permanent ones. + * If a temporary object exists in a given path, make sure to drop the temporary object first + * using {@link #dropTemporaryTable}. + * + * <p>Compared to SQL, this method will not throw an error if the table does not exist. Use + * {@link #dropTable(java.lang.String, boolean)} to change the default behavior. + * + * @param path The given path under which the table will be dropped. See also the {@link + * TableEnvironment} class description for the format of the path. + * @return true if a table existed in the given path and was removed + */ + boolean dropTable(String path); + + /** + * Drops a table registered in the given path. + * + * <p>This method can only drop permanent objects. Temporary objects can shadow permanent ones. + * If a temporary object exists in a given path, make sure to drop the temporary object first + * using {@link #dropTemporaryTable}. + * + * @param path The given path under which the given table will be dropped. See also the {@link + * TableEnvironment} class description for the format of the path. + * @param ignoreIfNotExists whether to ignore if table does not exist. + * @return true if a table existed in the given path and was removed, throws {@link Review Comment: ok let's sync it with CatalogManager. >I think if we want to mention the ValidationException this should be in the body of the javadoc, or as an @exception if we want to declare the ValidationException on the method. Though I see it is mentioned in the Not sure if I get what you mean here. There is no such annotations as `@exception`, there is `@throws` may be you mean this one. However it is not recommended to use it for non check exceptions for that reason I'd prefer not to use it for `ValidationException` -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org