xinrong-databricks commented on code in PR #36034:
URL: https://github.com/apache/spark/pull/36034#discussion_r843044086


##########
python/pyspark/pandas/__init__.py:
##########
@@ -151,3 +154,13 @@ def _auto_patch_pandas() -> None:
 from pyspark.pandas.config import get_option, options, option_context, 
reset_option, set_option
 from pyspark.pandas.namespace import *  # noqa: F403
 from pyspark.pandas.sql_formatter import sql
+
+
+def __getattr__(key: str) -> Any:
+    if key.startswith("__"):
+        raise AttributeError(key)
+    if hasattr(_MissingPandasLikeGeneralFunctions, key):
+        func = getattr(_MissingPandasLikeGeneralFunctions, key)
+        return partial(func)

Review Comment:
   May I ask why not return `func` directly?



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