AngersZhuuuu commented on a change in pull request #29933:
URL: https://github.com/apache/spark/pull/29933#discussion_r502162237



##########
File path: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
##########
@@ -329,17 +339,21 @@ private[hive] class SparkExecuteStatementOperation(
     }
   }
 
-  override def cancel(): Unit = {
+  private def cancel(stateAfterCancel: OperationState): Unit = {
     synchronized {
       if (!getStatus.getState.isTerminal) {
         logInfo(s"Cancel query with $statementId")
-        setState(OperationState.CANCELED)
+        setState(stateAfterCancel)
         cleanup()
         HiveThriftServer2.eventManager.onStatementCanceled(statementId)

Review comment:
       Also support add a server side configuration about query TIMEOUT




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to