zhengruifeng commented on code in PR #39296:
URL: https://github.com/apache/spark/pull/39296#discussion_r1059218456


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

Review Comment:
   I think this issue is a bit complicated, since not all binary ops have this 
type of string repr, for example:
   
   ```
   In [11]: df.name + 1
   Out[11]: Column<'(name + 1)'>
   
   In [12]: df.name + df.age
   Out[12]: Column<'(name + age)'>
   
   In [13]: df.name.startswith("n")
   Out[13]: Column<'startswith(name, n)'>
   
   In [14]: df.name.startswith(df.age)
   Out[14]: Column<'startswith(name, age)'>
   ```
   
   we may also need to take unary ops into account.
   
   I guess we need to keep a list to control which function can be represented 
in this way.



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