wecharyu commented on PR #4904: URL: https://github.com/apache/hive/pull/4904#issuecomment-1830047257
`dropDatabase` may encounter `NoSuchObjectException` if the database does not exist: https://github.com/apache/hive/blob/6b2e21a93ef3c1776b689a7953fc59dbf52e4be4/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java#L1675-L1684 `dropDataConnector` is compatible because it already wrap the exception in master: https://github.com/apache/hive/blob/6b2e21a93ef3c1776b689a7953fc59dbf52e4be4/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L992-L999 The reason to add this change is that most exceptions in `Hive.java` are wrapped into `HiveException`, such as `dropTable`. And when using Hive call we do not need catch extra exceptions except for HiveException. Also this change will not affect the user result because NoSuchObjectException will be caught in HiveException. CC: @ayushtkn @aturoczy -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
