HyukjinKwon opened a new pull request, #710: URL: https://github.com/apache/spark-connect-rust/pull/710
### What changes were proposed in this pull request? A follow-up of SPARK-61710, SPARK-61713 and SPARK-61711 for the native ML classes. Each change matches what PySpark 4.3.0 does over Spark Connect: - `StopWordsRemover` fetches its server defaults, `stopWords` and `locale`, when it is constructed, as PySpark's constructor does. It uses `params_api::server_defaults`, and raises a bare `AssertionError` without an active session. - `ALSModel.rank` and its four `recommendFor*` methods now use `native_model!`. `rank` is fetched on each access. - `PrefixSpan.findFrequentSequentialPatterns` and `ALSModel.recommendForUserSubset`/`recommendForItemSubset` send their dataset through `fetch_arg_of`. A dataset that isn't a DataFrame is now sent, and the server rejects it, instead of raising a `TypeError`. That leaves `helper_dataset_of` with no callers, so it is removed. - Rust: `ALSModel::rank()` returns `Result<i32>` and fetches the rank on each call, and `ALSModel::load` sends only its `Read`. ### Why are the changes needed? For parity with `pyspark.ml` 4.3.0. ### Does this PR introduce _any_ user-facing change? Yes, the behavior changes above. In Rust, `ALSModel::rank()` now returns a `Result`. ### How was this patch tested? - The feature and fpm/recommendation API cases pass on this client and on the official `pyspark-client`. New golden cases cover non-DataFrame datasets. - The offline replay of the fpm, recommendation and evaluation golden now also checks the ALS model loads and the `rank` fetches. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5.5 This pull request and its description were written by Isaac. -- 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]
