You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/14 03:55:32 UTC
[GitHub] [spark] xinrong-databricks commented on a change in pull request #35840: Implement `keep` parameter of `frame.nlargest/nsmallest` to decide how to resolve ties
xinrong-databricks commented on a change in pull request #35840:
URL: https://github.com/apache/spark/pull/35840#discussion_r825576162
##########
File path: python/pyspark/pandas/frame.py
##########
@@ -6826,8 +6826,28 @@ def drop(
)
return DataFrame(internal)
+ def _prepare_sort_by_scols(self, by: Union[Name, List[Name]]) -> List[Column]:
+ if is_name_like_value(by):
Review comment:
Extract `_prepare_sort_by_scols` in order to make `nlargest/nsmallest` rely on `_sort` rather than `sort_values`, since `sort_values` has no `keep` parameter.
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org