HyukjinKwon opened a new pull request, #634: URL: https://github.com/apache/spark-connect-rust/pull/634
### What changes were proposed in this pull request? A follow-up to #616 from its post-merge review, in the native ML of the Python client: - A pandas column of `pyspark.ml.linalg` vectors (or None), as `toPandas()` returns a vector column, is now sent as the arrays of the vectors. PySpark's LogisticRegression transform stacks the vectors the same way, and a SparseVector is densified. A frame whose column Arrow still cannot take now goes through `createDataFrame`, which raises its own error, instead of pyarrow's raw `ArrowInvalid`. - The ML live tests pick their class with one shared helper. It fails when this client lacks the native class, where the old fallbacks silently tested the official class. ### Why are the changes needed? `fit` and `transform` of a pandas frame from `toPandas()` raised a raw `ArrowInvalid` in the native estimators. The official LogisticRegression transforms such a frame. ### Does this PR introduce _any_ user-facing change? Yes. The native ML's fit, transform and evaluate now take pandas frames of vector cells. ### How was this patch tested? - New offline and live tests. The offline test fails without the change. - `test_ml_offline.py`: 159 passed. The nine ML live test files against a Spark 4.3.0 Connect server: 191 passed. Two of them also pass on the official `pyspark-client` 4.3.0. - `cargo clippy -p pyspark-rs --all-targets -- -D warnings` passes. ### 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]
