[
https://issues.apache.org/jira/browse/HIVE-25812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17462445#comment-17462445
]
Zoltan Haindrich commented on HIVE-25812:
-----------------------------------------
[~scarlin] could you add the exception trace to the description?
> 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
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)