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


##########
python/pyspark/sql/connect/column.py:
##########
@@ -73,20 +114,6 @@ def __str__(self) -> str:
         return f"Literal({self._value})"
 
 
-def _bin_op(
-    name: str, doc: str = "binary function", reverse: bool = False
-) -> Callable[["ColumnRef", Any], Expression]:
-    def _(self: "ColumnRef", other: Any) -> Expression:
-        if isinstance(other, get_args(PrimitiveType)):
-            other = LiteralExpression(other)
-        if not reverse:
-            return ScalarFunctionExpression(name, self, other)
-        else:
-            return ScalarFunctionExpression(name, other, self)
-
-    return _
-
-
 class ColumnRef(Expression):

Review Comment:
   I think we should rename this to `AttributeReference` to avoid confusion 
e.g., I think it's a bit mixed with `Column` interface that is the user-facing 
interface. @amaliujia and @cloud-fan 
   
   Should better to keep it matched with either Catalyst internal types or 
user-facing Spark SQL interface classes.



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