zhengruifeng commented on code in PR #39041:
URL: https://github.com/apache/spark/pull/39041#discussion_r1051856939
##########
python/pyspark/sql/utils.py:
##########
@@ -307,3 +311,52 @@ def is_timestamp_ntz_preferred() -> bool:
"""
jvm = SparkContext._jvm
return jvm is not None and jvm.PythonSQLUtils.isTimestampNTZPreferred()
+
+
+def is_remote() -> bool:
+ """
+ Returns if the current running environment is for Spark Connect.
+ """
+ return "SPARK_REMOTE" in os.environ
+
+
+def try_remote_functions(f: FuncT) -> FuncT:
Review Comment:
got it, thank for the explanation
--
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]