rkirtir commented on code in PR #4188:
URL: https://github.com/apache/hive/pull/4188#discussion_r1214144450
##########
beeline/src/java/org/apache/hive/beeline/BeeLine.java:
##########
@@ -1359,22 +1359,53 @@ private int executeFile(String fileName) {
}
}
+ public String executeReader(ConsoleReader reader, Character mask) {
+ String line = null;
+ StringBuilder qsb = new StringBuilder();
+ try {
+ while ((line = (getOpts().isSilent() && getOpts().getScriptFile() !=
null) ? reader
+ .readLine(null, mask) : reader.readLine(getPrompt())) != null) {
+ // Skipping through comments
+ if (!line.startsWith("--")) {
+ qsb.append(line + "\n");
+ }
+ }
+ if (qsb.length() > 0) {
+ qsb.delete(qsb.length() - 2, qsb.length());
+ }
+ line = qsb.toString();
+ }
+ catch (Throwable t) {
+ handleException(t);
Review Comment:
Can we consider adding log here with
LOG.error("Unexpected error in thread: {}, message: {}",
Thread.currentThread().getName(), t.getMessage());
--
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]