zero323 commented on a change in pull request #35150:
URL: https://github.com/apache/spark/pull/35150#discussion_r781017983
##########
File path: python/pyspark/pandas/series.py
##########
@@ -3611,9 +3612,14 @@ def _rank(
raise NotImplementedError("rank do not support MultiIndex now")
if ascending:
- asc_func = lambda scol: scol.asc()
+
+ def asc_func(scol: Column) -> Column:
+ return scol.asc()
+
else:
- asc_func = lambda scol: scol.desc()
+
+ def asc_func(scol: Column) -> Column:
+ return scol.desc()
Review comment:
These two could be replaced with `sql.functions.{asc, desc}` or
unapplied methods (`Column.asc` / `Column.desc`), couldn't they?
--
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]