diff --git a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala index fe773e4b7041d..269e47609dbf3 100644 --- a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala +++ b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala @@ -348,6 +348,12 @@ object SparkConnectService extends Logging { userSessionMapping.get((userId, sessionId), default) } + /** + * If there are no executions, return Left with System.currentTimeMillis of last active + * execution. Otherwise return Right with list of ExecuteInfo of all executions. + */ + def listActiveExecutions: Either[Long, Seq[ExecuteInfo]] = executionManager.listActiveExecutions + /** * Used for testing */