hudi-agent commented on code in PR #20145:
URL: https://github.com/apache/hudi/pull/20145#discussion_r4138297234
##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/HiveQueryDDLExecutor.java:
##########
@@ -181,25 +181,25 @@ private static boolean isUseStatement(String sql) {
* bound for the duration, and the thread handed back as found: it may
belong to another executor
* or to an application that embeds this sync and holds a session of its own.
*/
- private List<CommandProcessorResponse> updateHiveSQLs(List<String> sqls) {
- List<CommandProcessorResponse> responses = new ArrayList<>();
+ private void updateHiveSQLs(List<String> sqls) {
HoodieTimer timer = HoodieTimer.start();
SessionState previousSession = SessionState.get();
ClassLoader previousLoader =
Thread.currentThread().getContextClassLoader();
try {
SessionState.setCurrentSessionState(sessionState);
for (String sql : sqls) {
if (hiveDriver != null) {
- responses.add(hiveDriver.run(sql));
+ HiveDriverUtil.runOrThrow(hiveDriver, sql);
}
}
+ } catch (HoodieHiveSyncException e) {
Review Comment:
🤖 nit: the `catch (HoodieHiveSyncException e) { throw e; }` right before the
generic `catch (Exception e)` is a little subtle — could you add a short
comment noting it's there to avoid double-wrapping the rejection error from
`runOrThrow`?
<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]