You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/09/01 15:17:07 UTC

[PR] [SPARK-59152][ML] Create CountVectorizer broadcast per transform [spark]

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

   ### What changes were proposed in this pull request?
   
   This PR creates the `CountVectorizerModel` dictionary and its broadcast for each `transform` call
   instead of caching the broadcast on the model.
   
   ### Why are the changes needed?
   
   The dictionary broadcast is transformation-only execution state. Retaining it on the model keeps the
   broadcast alive for the model's lifetime and ties later transformations to the `SparkContext` used by
   the first transformation. A transform-scoped broadcast follows the lifecycle of the returned lazy
   DataFrame and matches the other explicit inference broadcasts in `org.apache.spark.ml`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   No tests were added because this is an internal broadcast lifecycle change and the transformation
   logic is unchanged. The patch was checked with `git diff --check` and source line-length and
   non-ASCII scans.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI 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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59152][ML] Create CountVectorizer broadcast per transform [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #58452:
URL: https://github.com/apache/spark/pull/58452#issuecomment-5502604875

   **Merge Summary:**
   - merged into branch-4.x https://github.com/apache/spark/commit/5ae05cac5d65e4cf44f363adaf8d3ce7646979e6
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59152][ML] Create CountVectorizer broadcast per transform [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #58452: [SPARK-59152][ML] Create CountVectorizer broadcast per transform
URL: https://github.com/apache/spark/pull/58452


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59152][ML] Create CountVectorizer broadcast per transform [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #58452:
URL: https://github.com/apache/spark/pull/58452#issuecomment-5502599866

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/065397779ce409996abed999e1d6b46ee98a6c34
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org