prashantwason opened a new pull request, #18092: URL: https://github.com/apache/hudi/pull/18092
### Describe the issue this Pull Request addresses This PR addresses HUDI-6912. The clustering plan partition filter does not guarantee a consistent sort order for filtered partitions, which can lead to non-deterministic behavior in clustering operations. ### Summary and Changelog Sort partitions after filtering in `PartitionAwareClusteringPlanStrategy.filterPartitionPaths()` to ensure consistent ordering. **Changes:** - Added `result.getLeft().sort(String::compareTo)` after calling `ClusteringPlanPartitionFilter.filter()` to ensure partitions are always sorted in ascending order - Updated log message to indicate sorting was applied - Updated unit tests to verify sorted output ### Impact No public API changes. Ensures deterministic partition ordering in clustering plan generation. ### Risk Level low - This is a minor behavioral change that ensures consistent ordering. The sorting is applied after existing filtering logic and does not change what partitions are selected, only their order. ### Documentation Update none ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
