diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala index 36d4ac095e10..71642c255bed 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala @@ -186,6 +186,7 @@ object HiveThriftServer2 extends Logging { def isExecutionActive(execInfo: ExecutionInfo): Boolean = { !(execInfo.state == ExecutionState.FAILED || execInfo.state == ExecutionState.CANCELED || + execInfo.state == ExecutionState.FINISHED || execInfo.state == ExecutionState.CLOSED) }