return opHandle;
} catch (HiveSQLException e) {
// Cleanup opHandle in case the query is synchronous
// Async query needs to retain and pass back the opHandle for error reporting
if (!runAsync) {
operationManager.closeOperation(opHandle);
}
throw e;
} finally {
release(true);
}