HyukjinKwon commented on code in PR #40525:
URL: https://github.com/apache/spark/pull/40525#discussion_r1156771777
##########
python/pyspark/pandas/frame.py:
##########
@@ -7462,19 +7490,24 @@ def _sort(
if na_position not in ("first", "last"):
raise ValueError("invalid na_position: '{}'".format(na_position))
- # Mapper: Get a spark column function for (ascending, na_position)
combination
+ Column = ConnectColumn if is_remote() else LegacyColumn
+ # Mapper: Get a spark colum
+ # n function for (ascending, na_position) combination
mapper = {
- (True, "first"): Column.asc_nulls_first,
- (True, "last"): Column.asc_nulls_last,
- (False, "first"): Column.desc_nulls_first,
- (False, "last"): Column.desc_nulls_last,
Review Comment:
Here too. I believe you can just replace `Column.desc_nulls_last` to `lambda
x: x.desc_nulls_last`.
--
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]