zhengruifeng opened a new pull request, #60050: URL: https://github.com/apache/spark/pull/60050
### What changes were proposed in this pull request? When multiple labels have the same maximum frequency, GraphX label propagation now selects the lowest label instead of the highest. The implementation documents this rule and the tests cover positive labels, negative labels, signed vertex ID limits, and frequency priority. This PR builds on the test-only follow-up #60026 and should merge after it. ### Why are the changes needed? Choosing the lowest tied label preserves deterministic results while aligning GraphX with GraphFrames and Spark SQL's deterministic `mode`, as discussed in [Sem's review comments](https://github.com/apache/spark/pull/60026#issuecomment-6592081340). ### Does this PR introduce _any_ user-facing change? Yes. Compared with the unreleased change in #48871, equal-frequency labels now resolve to the lowest label. For example, if vertex 0 receives labels 1 and 2 once each, it selects label 1 instead of label 2. ### How was this patch tested? ``` build/sbt 'graphx/testOnly org.apache.spark.graphx.lib.LabelPropagationSuite' \ 'graphx/scalastyle' 'graphx/Test/scalastyle' ``` All 5 tests and both style checks passed. The three tie-breaking cases were also verified to fail against the previous highest-label implementation. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex (GPT-6) -- 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]
