cloud-fan commented on code in PR #54434:
URL: https://github.com/apache/spark/pull/54434#discussion_r2844440160
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala:
##########
@@ -38,6 +38,43 @@ import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.internal.StaticSQLConf.SQL_EVENT_TRUNCATE_LENGTH
import org.apache.spark.util.{Utils, UUIDv7Generator}
+/**
+ * Captures SQL-specific thread-local variables so they can be restored on a
different thread.
+ * Use [[SQLExecution.captureThreadLocals]] to create an instance on the
originating thread,
+ * then call [[runWith]] on the target thread to execute a block with these
thread locals applied.
+ */
+case class SQLExecutionThreadLocalCaptured(
Review Comment:
nvm, this does not use `ThreadLocal` directly.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]