You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/05/14 07:03:40 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #41142: [SPARK-43302][SQL][FOLLOWUP] Code cleanup for PythonUDAF

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


##########
python/pyspark/sql/udf.py:
##########
@@ -439,13 +439,23 @@ def func(*args: Any, **kwargs: Any) -> Any:
                 func.__signature__ = inspect.signature(f)  # type: ignore[attr-defined]
                 judf = self._create_judf(func)
                 jPythonUDF = judf.apply(_to_seq(sc, cols, _to_java_column))
-                id = jPythonUDF.expr().resultId().id()
+                id = self._get_UDF_id(jPythonUDF.expr())
                 sc.profiler_collector.add_profiler(id, memory_profiler)
         else:
             judf = self._judf
             jPythonUDF = judf.apply(_to_seq(sc, cols, _to_java_column))
         return Column(jPythonUDF)
 
+    def _get_UDF_id(self, jexpr: JavaObject) -> int:

Review Comment:
   I think should be lowercased
   
   ```suggestion
       def _get_udf_id(self, jexpr: JavaObject) -> int:
   ```



-- 
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-unsubscribe@spark.apache.org

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


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