[ 
https://issues.apache.org/jira/browse/BEAM-10873?focusedWorklogId=484255&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-484255
 ]

ASF GitHub Bot logged work on BEAM-10873:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Sep/20 00:51
            Start Date: 15/Sep/20 00:51
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on a change in pull request #12812:
URL: https://github.com/apache/beam/pull/12812#discussion_r488315040



##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -551,9 +559,13 @@ def merge(
       return merged.reset_index(drop=True)
 
   @frame_base.args_to_kwargs(pd.DataFrame)
-  def nlargest(self, **kwargs):
-    if 'keep' in kwargs and kwargs['keep'] != 'all':
+  @frame_base.populate_defaults(pd.DataFrame)
+  def nlargest(self, keep, **kwargs):
+    if keep == 'any':
+      keep = 'first'

Review comment:
       Yep, exactly. Dropped a TODO. I'm thinking we may want a context (like 
we have for non-parallel operations) for operations like this to explicitly say 
that one doesn't care about ordering (e.g. `nlargest` would default to `any` so 
`df.nlargest(10)` would just work as-is. 
   
   
   PartitioningSession caused the rows to get perumuted. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 484255)
    Time Spent: 2h 40m  (was: 2.5h)

> Stronger testing of dataframes partitioning declartions.
> --------------------------------------------------------
>
>                 Key: BEAM-10873
>                 URL: https://issues.apache.org/jira/browse/BEAM-10873
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Robert Bradshaw
>            Assignee: Robert Bradshaw
>            Priority: P2
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> This would better detect issues like that discovered in 
> https://github.com/apache/beam/pull/12676



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to