HyukjinKwon opened a new pull request, #362: URL: https://github.com/apache/spark-connect-rust/pull/362
### What changes were proposed in this pull request? [SPARK-61169](https://issues.apache.org/jira/browse/SPARK-61169): PySpark Connect's `SparkConnectClient` (`spark.client`) has three methods that read configurations, each in one `Config` request: - `get_configs(*keys)`, of `Get` - `get_config_dict(*keys)`, of `Get` - `get_config_with_defaults(*pairs)`, of `GetWithDefault` for the pairs of a key and its default pandas-on-Spark's `is_ansi_mode_enabled` calls `get_config_with_defaults`. It reads its ANSI mode so to show a Series or a DataFrame, and in `to_numeric` and other functions. The client's `SparkConnectClient` now has the three methods, also one request each: - **Rust core**: `RuntimeConfig::get_with_defaults` reads the values of keys of defaults in one request, as `RuntimeConfig::get_many` does of keys. - **Python client**: the methods read the configurations through private methods of the client's `RuntimeConfig` (`_get_many`, `_get_with_defaults`). ### Why are the changes needed? The client's `SparkConnectClient` had none of them: ``` AttributeError: 'SparkConnectClient' object has no attribute 'get_config_with_defaults' ``` Three tests of Apache Spark's pandas-on-Spark failed on this client: `test_to_numeric` of `test_parity_namespace.py`, `test_repr_series` of `test_parity_repr.py`, and `test_creation_index_same_anchor` of `frame/test_parity_constructor.py`. ### Does this PR introduce _any_ user-facing change? Yes. `spark.client` has the configuration methods of PySpark 4.3.0, and pandas-on-Spark shows its Series and DataFrames under them. For the Rust API, `RuntimeConfig::get_with_defaults` is new. ### How was this patch tested? - A new live test checks: - the values of the three methods, of a key that is set, a key that is not set with a default and one without - the `SparkNoSuchElementException` `SQL_CONF_NOT_FOUND` of `get_configs` of a key that is not set - the repr of a pandas-on-Spark Series It passes with official PySpark 4.3.0, and fails without this change. - The values and the error against a local server are those of official PySpark 4.3.0. - Apache Spark's `test_parity_namespace.py`, `test_parity_repr.py` and `frame/test_parity_constructor.py`, of pandas-on-Spark, pass on this client against a local server: 17, 7 and 11 tests. - The lib tests of both crates (599 passed), the build of all tests, also with `wasm-udf`, the offline Python suites (2224 passed, 8 skipped), and the live drop-in and Arrow suites (208 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]
