You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Steve Carlin (Jira)" <ji...@apache.org> on 2021/12/15 23:59:00 UTC
[jira] [Created] (HIVE-25812) GetResultSchema service called in ERROR state
Steve Carlin created HIVE-25812:
-----------------------------------
Summary: GetResultSchema service called in ERROR state
Key: HIVE-25812
URL: https://issues.apache.org/jira/browse/HIVE-25812
Project: Hive
Issue Type: Improvement
Components: CLI
Reporter: Steve Carlin
After the "Execute" call is made from an HS2 client, the "GetResultsMetaData" is called, followed by the "Fetch" call.
If the "Execute" sets the error state to "ERROR" before the GetResultsMetaData has been called, an exception is thrown since it only expects the state to be RUNNING or FINISHED.
The code affecting it is SQLOperation:
{code:java}
@Override
public TableSchema getResultSetSchema() throws HiveSQLException {
// Since compilation is always a blocking RPC call, and schema is ready after compilation,
// we can return when are in the RUNNING state.
assertState(Arrays.asList(OperationState.RUNNING, OperationState.FINISHED));
if (resultSchema == null) {
resultSchema = new TableSchema(driver.getSchema());
}
return resultSchema;
}
{code}
Adding ERROR to "assertState" should fix the problem.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)