wombatu-kun commented on code in PR #12867:
URL: https://github.com/apache/hudi/pull/12867#discussion_r1978387701
##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/TableCommand.java:
##########
@@ -149,7 +150,7 @@ public String createTable(
try {
HoodieTableMetaClient.builder().setConf(HoodieCLI.conf.newInstance()).setBasePath(path).build();
existing = true;
- } catch (TableNotFoundException dfe) {
+ } catch (TableNotFoundException | InvalidTableException dfe) {
Review Comment:
Both `TableNotFoundException` and `InvalidTableException` extend
`HoodieException`, which is unchecked. We don't need to catch them every time
initiating the meta client, but there are some cases, where it's
necessary/reasonable. Moreover, `HoodieIOException` (extends
`HoodieException`), also might be thrown while creating the meta client. So i
think, it's better to distinguish these errors not only by messages, but by
exception types too.
--
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]