zhengruifeng commented on code in PR #53161:
URL: https://github.com/apache/spark/pull/53161#discussion_r2555636932


##########
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala:
##########
@@ -282,6 +283,9 @@ private[spark] abstract class BasePythonRunner[IN, OUT](
     if (simplifiedTraceback) {
       envVars.put("SPARK_SIMPLIFIED_TRACEBACK", "1")
     }
+    if (sessionLocalTimeZone.isDefined) {
+      envVars.put("SPARK_SESSION_LOCAL_TIMEZONE", sessionLocalTimeZone.get)

Review Comment:
   for arrow-based UDFs, `sessionLocalTimeZone` is actually already passed to 
the python side 
https://github.com/apache/spark/blob/ed23cc39c32e0ca953f174f48ddff78ba24da375/sql/core/src/main/scala/org/apache/spark/sql/execution/python/ArrowPythonRunner.scala#L153
   
   However this `workerConf` is not available in vanilla Python UDF, probably 
we can consider supporting it in vanilla Python UDF in the future. also cc 
@HeartSaVioR 



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

Reply via email to