You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ru...@apache.org on 2023/03/03 02:30:01 UTC
[spark] branch branch-3.4 updated: [SPARK-42615][CONNECT][FOLLOWUP] Fix SparkConnectAnalyzeHandler to use withActive
This is an automated email from the ASF dual-hosted git repository.
ruifengz pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.4 by this push:
new 0493fe88db5 [SPARK-42615][CONNECT][FOLLOWUP] Fix SparkConnectAnalyzeHandler to use withActive
0493fe88db5 is described below
commit 0493fe88db57ab9218c66455c2448871a27c765d
Author: Takuya UESHIN <ue...@databricks.com>
AuthorDate: Fri Mar 3 10:29:21 2023 +0800
[SPARK-42615][CONNECT][FOLLOWUP] Fix SparkConnectAnalyzeHandler to use withActive
### What changes were proposed in this pull request?
Fix `SparkConnectAnalyzeHandler` to use `withActive`.
### Why are the changes needed?
Similar to #40165, `SQLConf.get` is necessary when transforming the proto to plans.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing tests.
Closes #40261 from ueshin/issues/SPARK-42615/withActive.
Authored-by: Takuya UESHIN <ue...@databricks.com>
Signed-off-by: Ruifeng Zheng <ru...@apache.org>
(cherry picked from commit 58f2897809b5ead9a08565218d327b8a11caa64c)
Signed-off-by: Ruifeng Zheng <ru...@apache.org>
---
.../spark/sql/connect/service/SparkConnectAnalyzeHandler.scala | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectAnalyzeHandler.scala b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectAnalyzeHandler.scala
index 90981f5b7ba..f6adcd852e8 100644
--- a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectAnalyzeHandler.scala
+++ b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectAnalyzeHandler.scala
@@ -37,10 +37,11 @@ private[connect] class SparkConnectAnalyzeHandler(
SparkConnectService
.getOrCreateIsolatedSession(request.getUserContext.getUserId, request.getClientId)
.session
-
- val response = process(request, session)
- responseObserver.onNext(response)
- responseObserver.onCompleted()
+ session.withActive {
+ val response = process(request, session)
+ responseObserver.onNext(response)
+ responseObserver.onCompleted()
+ }
}
def process(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org