HyukjinKwon commented on code in PR #46215:
URL: https://github.com/apache/spark/pull/46215#discussion_r1578922375


##########
python/pyspark/errors/utils.py:
##########
@@ -197,6 +197,16 @@ def with_origin_to_class(cls: Type[T]) -> Type[T]:
     """
     if os.environ.get("PYSPARK_PIN_THREAD", "true").lower() == "true":
         for name, method in cls.__dict__.items():
-            if callable(method) and name != "__init__":
+            # Excluding Python magic methods that do not utilize JVM functions.
+            if callable(method) and name not in (
+                "__init__",
+                "__new__",
+                "__getattr__",
+                "__getitem__",

Review Comment:
   I think `__getattr__` and `__getitem__` is still a PySpark expression? like 
`functions.getItem` 



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to