xinrong-databricks commented on a change in pull request #34226:
URL: https://github.com/apache/spark/pull/34226#discussion_r726639810
##########
File path: python/pyspark/sql/functions.py
##########
@@ -1698,7 +1699,7 @@ def log(arg1: Union["ColumnOrName", float], arg2:
Optional["ColumnOrName"] = Non
"""
sc = SparkContext._active_spark_context # type: ignore[attr-defined]
if arg2 is None:
- jc = sc._jvm.functions.log(_to_java_column(arg1))
+ jc = sc._jvm.functions.log(_to_java_column(cast("ColumnOrName", arg1)))
Review comment:
Below are existing overloads, did you mean to remove the existing ones?
```py
@overload # type: ignore[no-redef]
def log(arg1: "ColumnOrName") -> Column: ...
@overload
def log(arg1: float, arg2: "ColumnOrName") -> Column: ...
```
##########
File path: python/pyspark/sql/column.py
##########
@@ -59,10 +81,14 @@ def _to_seq(sc, cols, converter=None):
"""
if converter:
cols = [converter(c) for c in cols]
- return sc._jvm.PythonUtils.toSeq(cols)
+ return sc._jvm.PythonUtils.toSeq(cols) # type: ignore[attr-defined]
-def _to_list(sc, cols, converter=None):
+def _to_list(
+ sc: SparkContext,
+ cols: List[Union[str, "Column"]],
Review comment:
Updated.
--
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]