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


##########
python/pyspark/sql/connect/functions.py:
##########
@@ -16,14 +16,247 @@
 #
 from pyspark.sql.connect.column import Column, LiteralExpression, 
ColumnReference
 
-from typing import Any
+from typing import Any, TYPE_CHECKING
+
+if TYPE_CHECKING:
+    from pyspark.sql.connect._typing import ColumnOrName
 
 # TODO(SPARK-40538) Add support for the missing PySpark functions.
 
 
+def _to_col(col: "ColumnOrName") -> Column:
+    return col if isinstance(col, Column) else column(col)
+
+
 def col(x: str) -> Column:
     return Column(ColumnReference(x))
 
 
+column = col

Review Comment:
   `column` itself is a public function.
   
   
https://github.com/apache/spark/blob/master/python/pyspark/sql/functions.py#L208



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

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


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

Reply via email to