HyukjinKwon opened a new pull request, #913:
URL: https://github.com/apache/spark-connect-rust/pull/913
### What changes were proposed in this pull request?
- `pyspark.sql.connect.local_server` is PySpark's, vendored from v4.3.0, as
pyspark-client 4.3.0 ships it. It is the opt-in reuse of a persistent local
Spark Connect server: `reuse_or_start_local_connect_server`,
`LocalConnectServer`, `Discovery`, and `python -m
pyspark.sql.connect.local_server --stop`. Before this change, its import raised
`ModuleNotFoundError`.
- The manifest of the official tests that the drop-in skips
(`scripts/dropin_known_failures.txt`) drops the entries of tests that pass with
the drop-in:
- `test_connect_retry.py` (9 of 9);
- `test_connect_local_server.py`, which imports the module, and whose
tests skip as they do with pyspark-client (`is_remote_only()`);
-
`test_connect_channel.py::ChannelBuilderTests::test_metadata_with_session_id`.
- The parity ledger (`dev/parity/inventory.csv`) is regenerated from the
v4.3.0 sources, as pyspark-client 4.3.0 ships them. It adds the rows of
`local_server`, `SparkConnectException.operation_id`, `SparkSession.__enter__`
and `__exit__`, and the functions `collect_union`, `from_base32`, `to_base32`
and `variant_strip_nulls`, all of which the drop-in has. It also moves the line
numbers of the rows that changed since the sources it was made of. The module
audit and the ledger's counts in `docs/compatibility.md` follow.
### Why are the changes needed?
To have every module of pyspark-client 4.3.0, and to run every official test
that passes with the drop-in.
### Does this PR introduce _any_ user-facing change?
Yes. `pyspark.sql.connect.local_server` imports, as in pyspark-client.
### How was this patch tested?
- A probe of both clients, with `SPARK_HOME` of Spark 4.3.0:
- `reuse_or_start_local_connect_server("local[2]", {})` of the drop-in
starts a persistent server, and a session of it runs a query;
- pyspark-client reuses that server;
- the drop-in's `python -m pyspark.sql.connect.local_server --stop` stops
it.
- On master, the import fails.
- `scripts/run_official_tests.py --dropin` of the three test files against a
Spark Connect 4.3.0 server.
- `test_dropin_class_modules_offline.py`, whose docstring golden covers the
module, and `test_ruff_excludes.py`.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code
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]