Ma77Ball opened a new pull request, #57392:
URL: https://github.com/apache/spark/pull/57392

   ### What changes were proposed in this pull request?
   
   Follow-up to 
[SPARK-58177](https://issues.apache.org/jira/browse/SPARK-58177) / #57314, 
which fixed a wrong operand in the SVD++ Phase 2 `aggregateMessages` combiner 
but merged without a test. This adds the regression test:
   
   - Extract the Phase 2 training-message merge logic into a package-private 
`SVDPlusPlus.combineTrainMessages`, and use it in place of the inline 
`aggregateMessages` combiner.
   - Add a unit test in `SVDPlusPlusSuite` that asserts both vectors and the 
scalar are summed element-wise, and that the input messages are not mutated.
   
   ### Why are the changes needed?
   
   The fixed bug (the second vector was based on `g2._2`, which dropped `g1._2` 
and doubled `g2._2`) only manifests when a vertex merges two or more differing 
messages, and the combiner was an inline lambda that could not be tested 
directly. Extracting it makes the merge logic unit-testable and guards against 
a future regression.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Added a unit test in `SVDPlusPlusSuite`; the full suite passes locally. The 
test was confirmed to fail when the pre-fix operand (`g2._2`) is restored and 
to pass with the fix in place.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   <!--
   If generative AI tooling has been used in the process of authoring this 
patch, please include the
   phrase: 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling 
Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   


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