hudi-agent commented on code in PR #19772:
URL: https://github.com/apache/hudi/pull/19772#discussion_r3873010571


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/UtilHelpers.java:
##########
@@ -520,36 +520,19 @@ private static Boolean tableExists(Connection conn, 
Map<String, String> options)
    * @throws Exception
    */
   public static HoodieSchema getJDBCSchema(Map<String, String> options) {

Review Comment:
   🤖 Merging the two try blocks means connection/`tableExists` failures now 
fall through to the single remaining `catch` and surface as "Unable to fetch 
schema from <table>" instead of the old "Failed to connect to jdbc" message. 
Since `createConnection`/`tableExists`/`conn.close()` all throw checked 
`SQLException` and the method has no `throws`, could you confirm the merged try 
still keeps a `catch (Exception e)` (and `catch (HoodieException e)`)? Also, on 
the success path a `conn.close()` failure would now be caught and reported as a 
schema-fetch failure even though the schema was fetched — worth a quick sanity 
check.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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

Reply via email to