HyukjinKwon opened a new pull request, #240: URL: https://github.com/apache/spark-connect-rust/pull/240
### What changes were proposed in this pull request? [SPARK-61042](https://issues.apache.org/jira/browse/SPARK-61042): `persist`, `cache` and `unpersist` now return the DataFrame itself, as PySpark Connect's do. `df.persist(storageLevel)`, `df.cache()` and `df.unpersist(blocking)` persist or unpersist the plan of the DataFrame and return the DataFrame itself, so `df.persist() is df`. ### Why are the changes needed? The client returned a new DataFrame object of the same plan, so `df.persist() is df` was `False`. ### Does this PR introduce _any_ user-facing change? Yes. These methods return the DataFrame itself, as in PySpark 4.3.0. ### How was this patch tested? - A new live test checks that these return the DataFrame itself, at the storage level given. It passes with official PySpark 4.3.0, and fails without this change. - A new offline test checks the same against a mock Connect server. - The lib tests of both crates (571 passed), the build of all tests, also with `wasm-udf`, the offline Python suites (1810 passed, 8 skipped), and the live drop-in and Arrow suites (109 passed) and live cases (10 passed) against a local Spark 4.3.0 server. Clippy reports no diagnostics in the changed lines. ### 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]
