hemanthumashankar0511 commented on code in PR #6401:
URL: https://github.com/apache/hive/pull/6401#discussion_r3029508883


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/functions/OnRenameFunction.java:
##########
@@ -149,7 +149,12 @@ public Void execute(MultiDataSourceJdbcResource 
jdbcResource) throws MetaExcepti
       // caught and either swallowed or wrapped in MetaException. Also, only a 
single test fails without this block:
       // 
org.apache.hadoop.hive.metastore.client.TestDatabases.testAlterDatabaseNotNullableFields
       // It may worth investigate if this catch block is really needed. 
-      if (e.getMessage() != null && e.getMessage().contains("does not exist")) 
{
+      String msg = e.getMessage();

Review Comment:
   The reason I included this change is that 
TestDatabases#testAlterDatabaseNotNullableFields started failing immediately 
after the move to Spring 6 in my first precommit run.
   In the older Spring version ig e.getMessage() included the nested exception 
text like 'does not exist' but in Spring 6, that detail seems to have moved 
specifically to the cause exception. "I'm not familiar with spring!!". Because 
the existing code only checks the top level message, it was failing to catch 
the 'table missing' case, which broke the test.
   I updated it to check getCause().getMessage() as well so it behaves the same 
way it did before the upgrade.
   what do you think?



-- 
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]

Reply via email to