grundprinzip commented on code in PR #46789:
URL: https://github.com/apache/spark/pull/46789#discussion_r1640213550
##########
python/pyspark/errors/utils.py:
##########
@@ -172,19 +181,38 @@ def _with_origin(func: Callable[..., Any]) ->
Callable[..., Any]:
@functools.wraps(func)
def wrapper(*args: Any, **kwargs: Any) -> Any:
from pyspark.sql import SparkSession
+ from pyspark.sql.utils import is_remote
spark = SparkSession.getActiveSession()
if spark is not None and hasattr(func, "__name__"):
- assert spark._jvm is not None
- pyspark_origin =
spark._jvm.org.apache.spark.sql.catalyst.trees.PySparkCurrentOrigin
+ if is_remote():
+ global current_origin
- # Update call site when the function is called
- _capture_call_site(spark, pyspark_origin, func.__name__)
+ # Getting the configuration requires RPC call. Uses the
default value for now.
+ depth = 1
Review Comment:
what's the purpose of depth?
--
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]