Now, if some previous errors happen on hive when we delete the namespace and some hive tables are left, the next time the delete call will try to drop the database directly instead of dropping the tables first, which results in InvalidOperationException(message:Database <database_name> is not empty. One or more tables exist.).
Deleting the CDAP datasets should delete the corresponding hive tables, but if there is an error when deleting the hive table, the dataset can be removed, while the hive tables remain. This inconsistency is causing the issue.
Closing issues that haven't been updated for more than 2 years.