You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/12/21 10:04:40 UTC

[GitHub] [incubator-kyuubi] cfmcgrady commented on a diff in pull request #4019: Binding python/sql spark session

cfmcgrady commented on code in PR #4019:
URL: https://github.com/apache/incubator-kyuubi/pull/4019#discussion_r1054202983


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala:
##########
@@ -177,3 +181,18 @@ class SparkSQLSessionManager private (name: String, spark: SparkSession)
 
   override protected def isServer: Boolean = false
 }
+
+object SparkSQLSessionManager {
+  private val sessionManager = new AtomicReference[SparkSQLSessionManager]
+
+  private def setSessionManager(manager: SparkSQLSessionManager): Unit = {
+    sessionManager.set(manager)
+  }
+
+  def getSparkSession(uuid: String): SparkSession = {
+    sessionManager.get()

Review Comment:
   we need a static method here, and call the method and return sql spark session on the python side. how can we get the sql spark session from `SparkSQLEngine`?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org