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

   ### What changes were proposed in this pull request?
   
   Change tree model `leafAttr` from a `lazy val` to a `def`.
   
   `leafAttr` is a small metadata object derived from `numLeave`, and 
`numLeave` remains cached.
   
   
   ### Why are the changes needed?
   
   `leafAttr` is only used when building leaf-column schema metadata. Since the 
expensive leaf count
   is already cached by `numLeave`, caching the derived attribute itself is 
unnecessary.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   
   ### How was this patch tested?
   
   Ran:
   
   ```
   build/sbt -java-home /usr/lib/jvm/java-17-openjdk-amd64 mllib/compile
   ```
   
   
   ### 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