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


##########
python/pyspark/sql/connect/column.py:
##########
@@ -314,3 +323,62 @@ def to_plan(self, session: "RemoteSparkSession") -> 
proto.Expression:
 
     def __str__(self) -> str:
         return f"({self._op} ({', '.join([str(x) for x in self._args])}))"
+
+
+class Column(object):

Review Comment:
   Sorry, but this comment is not helpful. 
   
   1) If merging `Expression` and `Column`, `SortOrder` would still be a 
derived class from `Expression` in the same way as literal is. The reason 
SortOrder does not exist is because PySpark simply delegates it to Java and 
doesn't know. cf `def desc: Column = withExpr { SortOrder(expr, Descending) }`
   
   2) If `Column` hides `Expression` it doesn't matter what `SortOrder` is or 
is not.
   
   
   Since we're doing design by review here (which is the worst way of doing 
designs), going forward let's make sure to include proposed examples of what 
you want to change and why. 
   
   



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