dbtsai opened a new pull request, #122: URL: https://github.com/apache/spark-connect-rust/pull/122
## What changes Repeated `SparkSession.version` access currently sends an AnalyzePlan RPC every time. Cache the first successful server version per session, matching Python Connect's `cached_property`. Rust handles for the same session share the cache; `newSession()` and `cloneSession()` receive independent caches. Failed RPCs and missing-result responses remain retryable. A successful cached value remains readable after `stop()`, as in Python Connect. Concurrent first access performs one lookup. This is independent of the DataFrame schema cache in #120 and is based directly on upstream master `d884e347452c`. ## Validation - Nine separate-process localhost gRPC regression tests: repeated/empty-string values, retry after RPC and missing-result errors, session isolation, active-session handles, concurrent first access, and stop before/after lookup. - The repeated-access regression fails on the unchanged baseline: 10 RPCs instead of one, for both ordinary and empty-string successful values. - Python offline suite: candidate and baseline each have 273 passed and the same existing `test_udt_protocol_roundtrip` import failure (`tests.test_dropin_offline`). - Rust release library: 393 passed. All integration tests compile in release mode, including with `wasm-udf`; formatting and diff checks pass. - Frozen client-only benchmark and validators, five fresh processes per client/case: 150/150 samples pass across ten cases. Repeated version median falls from 0.18326334 ms to 0.00018666 ms (about 982x); timed version RPCs fall from 50 to zero after one warmup lookup. First access retains one RPC (0.49375 vs 0.479166 ms). - Eight unrelated guards retain their RPC counts and pass validation. Guard timing is exploratory: `api-withColumn` median is 16% higher, with overlapping sample ranges (baseline 0.000268–0.000318 ms; candidate 0.000271–0.000419 ms). The fixture measures client work, not Spark execution. No JVM/live Spark suite was run. Clippy is unavailable in the bundled toolchain. The existing Python offline UDT import failure is disclosed in the validation artifacts. 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]
