zhengruifeng commented on code in PR #38858: URL: https://github.com/apache/spark/pull/38858#discussion_r1036848605
########## 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) Review Comment: after the refactoring, `Column` no longer takes a str as input -- 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]
