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

   ### What changes were proposed in this pull request?
   
   Snapshot the configured polynomial degree while creating 
PolynomialExpansion's transform function. The resulting function no longer 
captures the PolynomialExpansion transformer.
   
   The serialized transform function decreases from 3,086 bytes to 1,322 bytes 
(57.2%).
   
   ### Why are the changes needed?
   
   Avoiding the transformer capture reduces the memory retained by the 
transform closure, which is especially useful for Spark Connect server 
workloads.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Compiled the edited PolynomialExpansion source and serialized its generated 
transform function with Java serialization. The existing 
PolynomialExpansionSuite covers the unchanged transform behavior.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex (GPT-5)


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