Yicong-Huang opened a new pull request, #52924:
URL: https://github.com/apache/spark/pull/52924

   ### What changes were proposed in this pull request?
   This PR adds explicit `.sort_index()` calls to pandas API tests for 
`bfill()` and `backfill()` operations to ensure deterministic test results.
   
   ### Why are the changes needed?
   The `bfill()` (backward fill) and `backfill()` operations in PySpark pandas 
API don't guarantee a specific output ordering. Tests that directly compared 
the results without sorting could fail intermittently due to differences in the 
natural ordering of results between pandas and PySpark implementations.
   
   By adding `.sort_index()` to both sides of the test assertions, we ensure 
tests are order-independent and deterministic.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Existing tests.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   


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

Reply via email to