ngsg commented on code in PR #5771:
URL: https://github.com/apache/hive/pull/5771#discussion_r2187220552


##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesGetExists.java:
##########
@@ -761,7 +761,7 @@ public void otherCatalog() throws TException {
     Assert.assertFalse("Table not exists", client.tableExists(catName, dbName, 
"non_existing_table"));
   }
 
-  @Test(expected = UnknownDBException.class)
+  @Test(expected = MetaException.class)

Review Comment:
   It seems there are subtle differences in exception handling depending on 
whether a method takes `catalog` or not. If I understand correctly, methods 
that do not take `catName` wrap exceptions by `MetaException` (maybe an older 
logic), while methods that do take `catalog` throw raw exceptions (perhaps a 
newer logic).
   
   I have reverted the last commit and applied the change only to 
`getAllMaterializedViewObjectsForRewriting`, which does not take any arguments 
and therefore does not cause this subtle difference.
   
   Maybe we can try to unify the exception handling logic, but I believe it 
would be better to address that under HIVE-29070 as you suggested.



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to