grundprinzip commented on code in PR #46789:
URL: https://github.com/apache/spark/pull/46789#discussion_r1643866010


##########
python/pyspark/sql/connect/expressions.py:
##########
@@ -89,7 +90,16 @@ class Expression:
     """
 
     def __init__(self) -> None:
-        pass
+        origin = current_origin()
+        fragment = origin.fragment
+        call_site = origin.call_site

Review Comment:
   I think this is what I don't like about this approach at least for Spark 
Connect. There is no need to use the thread-local for this propagation. 
   
   The outside wrapper manipulates the global state for the constructor to pick 
up here. Shouldn't we simply generate the origin here?



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