in phoenix5-hive/src/it/java/org/apache/hadoop/hive/ql/QTestUtil.java [1265:1300]
private int executeClientInternal(String commands) {
List<String> cmds = CliDriver.splitSemiColon(commands);
int rc = 0;
String command = "";
for (String oneCmd : cmds) {
if (StringUtils.endsWith(oneCmd, "\\")) {
command += StringUtils.chop(oneCmd) + "\\;";
continue;
} else {
if (isHiveCommand(oneCmd)) {
command = oneCmd;
} else {
command += oneCmd;
}
}
if (StringUtils.isBlank(command)) {
continue;
}
if (isCommandUsedForTesting(command)) {
rc = executeTestCommand(command);
} else {
rc = cliDriver.processLine(command);
}
if (rc != 0 && !ignoreErrors()) {
break;
}
command = "";
}
if (rc == 0 && SessionState.get() != null) {
SessionState.get().setLastCommand(null); // reset
}
return rc;
}