HyukjinKwon opened a new pull request, #175: URL: https://github.com/apache/spark-connect-rust/pull/175
### What changes were proposed in this pull request? [SPARK-60955](https://issues.apache.org/jira/browse/SPARK-60955): `pyspark.ml.connect.functions` is now vendored, byte for byte from Apache Spark v4.3.0. It builds the columns of `pyspark.ml.functions.vector_to_array` and `array_to_vector` through `pyspark.sql.connect.functions.builtin`, which the client provides. `scripts/check_vendored_upstream.sh` now checks it against the tag. ### Why are the changes needed? `pyspark.ml.functions` (vendored with 90fcaf7) imports these functions from `pyspark.ml.connect.functions` under Spark Connect, which the client did not have. So every call raised `ImportError: cannot import name 'functions' from 'pyspark.ml.connect'`. For example, `spark.sql("SELECT array(1.5D, 2.0D) a").select(vector_to_array(array_to_vector("a")))` failed, where PySpark 4.3.0 gives `[1.5, 2.0]`. ### Does this PR introduce _any_ user-facing change? Yes, `vector_to_array` and `array_to_vector` work, as in PySpark 4.3.0. ### How was this patch tested? - Against a local Spark 4.3.0 server, the reprs of `vector_to_array` with both dtypes and of `array_to_vector`, and their values, are the same as with official PySpark 4.3.0. - `scripts/check_vendored_upstream.sh` reports the new file as matching v4.3.0. - A new offline test checks the reprs. A new live test checks the values, and it also passes with official PySpark 4.3.0. - The offline Python suites (614 passed, 8 live cases skipped), the live drop-in and Arrow suites (58 passed) and live cases (10 passed). The change has no Rust code. Collecting a vector column still gives a `Row` rather than a `DenseVector`, and `dtypes` shows `udt` rather than `vector`, as values of a user-defined type are not deserialized. That is filed separately. ### 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]
