zhengruifeng opened a new pull request, #58325: URL: https://github.com/apache/spark/pull/58325
### What changes were proposed in this pull request? This follow-up to #58170 starts the `CountVectorizerModel` count filtering and conversion pipelines from an iterator for both binary and non-binary output. ### Why are the changes needed? `OpenHashMap` is a strict `Iterable`, so calling `filter` and `map` on it materializes intermediate collections for every transformed document. Using its iterator keeps those operations lazy and materializes only the sequence required by `Vectors.sparse`. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Not run. This only changes collection evaluation from strict to lazy; existing `CountVectorizerSuite` transform tests cover the output behavior. `git diff --check` passes. ### 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]
