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


##########
python/pyspark/sql/connect/expressions.py:
##########
@@ -438,6 +438,59 @@ def __repr__(self) -> str:
             return f"{self._name}({', '.join([str(arg) for arg in 
self._args])})"
 
 
+class PythonFunction(Expression):

Review Comment:
   Using `PythonFunction` as a subclass of `Expression` makes only sense if it 
can be used as an individual expression. Since this is not the case, I would 
not define it as such. This gives you the freedom to essentially use the same 
interface but return `PythonFunction` in the `to_plan` method.
   
   In addition, it might be questionable to create such a large wrapper for 
just a byte array.



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