vikramahuja1001 commented on code in PR #6510:
URL: https://github.com/apache/hive/pull/6510#discussion_r3342884165
##########
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java:
##########
@@ -295,7 +295,9 @@ CommandProcessorResponse processLocalCmd(String cmd,
CommandProcessor proc, CliS
console.printError("Failed with exception " + e.getClass().getName()
+ ":" + e.getMessage(),
"\n" + org.apache.hadoop.util.StringUtils.stringifyException(e));
throw new CommandProcessorException(1);
- } finally {
+ } catch (RuntimeException e) {
Review Comment:
Reason for this change:
1. The SimpleFetchOptimizer change disables caching for non-ACID tables,
making FetchTask.execute() a no op. Rows are now fetched lazily via
Driver.getResults() after qp.run(). So the exceptions that previously surfaced
inside qp.run() now escapes as unchecked RunTimeException from the fetch loop.
2. ProcessLocalCmd() only caught IOExceptions, so the RunTImeException
bubbled up and never became a CommandProcessorException causing tests tests
like, udf_assert_true.q, udf_assert_true2.q to fail.
3. The fix adds a separate catch (RuntimeException e) that silently converts
it to CommandProcessorException. It intentionally does not reprint the error
since FetchTask.executeInner() already did that. Plus doing that will change
.q.out file which i was trying to avoid.
--
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]