protected HiveSQLException toSQLException(String prefix, CommandProcessorResponse response) {
HiveSQLException ex = new HiveSQLException(prefix + ": " + response.getErrorMessage(),
response.getSQLState(), response.getResponseCode());
if (response.getException() != null) {
ex.initCause(response.getException());
}
return ex;
}
}