Huanli Wang created SPARK-55646:
-----------------------------------
Summary: Refactored SQLExecution.withThreadLocalCaptured to
separate thread-local capture from execution
Key: SPARK-55646
URL: https://issues.apache.org/jira/browse/SPARK-55646
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 4.2.0
Reporter: Huanli Wang
Previously, callers had to provide an ExecutorService upfront: thread-local
capture and task submission were fused into a single call that immediately
returned a CompletableFuture.
Now, captureThreadLocals(sparkSession) captures the current thread's SQL
context into a standalone SQLExecutionThreadLocalCaptured object. Callers can
then invoke `runWith \{ body }` on any thread, at any time, using any
concurrency primitive — not just ExecutorService.
`withThreadLocalCaptured` is preserved for backward compatibility and now
delegates to these two primitives.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]