anishmehta24 opened a new pull request, #41663:
URL: https://github.com/apache/beam/pull/41663

   Fixes #41662
   
   `_idxmaxmin_helper` runs pandas `idxmax`/`idxmin` on every partition before 
the final step. pandas raises `ValueError` on an empty partition (easy to get 
after a filter), and on an all-NA one for datetime, string and nullable dtypes, 
even when the whole column has values. `compute_idx` now passes such a 
partition on unchanged, so the final step sees its rows and gives the pandas 
result. If every partition is empty, the final step still raises, as pandas 
does.
   
   Added `test_idxmin_idxmax_all_na_partition` to frames_test.py (each test 
partition holds one row there, so the NaT rows make all-NaT partitions) and 
`test_idxmin_idxmax_with_empty_partition` to transforms_test.py (a pipeline 
where the filter leaves one batch empty). Both fail on master. The 
apache_beam/dataframe tests and the DataFrame and Series pandas doctests pass.
   


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

Reply via email to