dbtsai opened a new pull request, #398: URL: https://github.com/apache/spark-connect-rust/pull/398
### What changes were proposed in this pull request? Propagate synchronous streaming query-start decoding errors from start() and toTable(), including when no listeners are registered. Report asynchronous transport, decoding and unknown-event errors once before clearing the affected subscription. Decode each event once and share it across the listener snapshot, including duplicate registrations. Native Rust listeners retain a silent default error hook and can opt into error reporting. Callback and warning hooks run without the listener-bus state lock. Concurrent removal of a non-last listener waits through its event callback or terminal error notification. This independent patch is based on master 925dc876f63f1f779fe176f62575a0aa96cc6886, which already contains the listener lifecycle and generation-scoped removal behavior. ### Why are the changes needed? Malformed listener events can disappear or leave registrations active, and terminal transport failures can clear listeners without PySpark's handler warning. The caller should receive a malformed synchronous start event's original exception, and asynchronous failures should emit the corresponding handler warning while allowing listeners to be registered again. ### Does this PR introduce _any_ user-facing change? Yes. Start-event decoding failures now reach the caller, and asynchronous failures warn once and clear registrations. Individual callback Exceptions continue to warn per listener while dispatch proceeds. The documented limits remain: - Normal stream EOF clears registrations silently; reference PySpark retains them. - An uncaught asynchronous callback BaseException, or a callback warning promoted to an error, ends the subscription and clears registrations. Reference PySpark can retain stale registrations. The terminal handler warning is best effort if warning filters raise. - Session stop() and close() cancel and clear listeners locally, without listener-removal RPCs or waiting for active callbacks. The current callback snapshot can finish. - A registered listener can retain its session through listener.spark. Initial listener RPC establishment follows the transport deadline/retry policy. The inherited single-generation dispatch-marker boundary is unchanged. ### How was this patch tested? - Formatting, release core/API library tests, integration-test compilation with and without wasm-udf, and the extension build passed. Offline Python recorded **2,605 passed and 8 inherited live-server skips**, including all **53 required listener cases**. All five new native unit tests passed. These were executed on the pre-comment revision and carried to the current source through exactly three documented comment-only replacements; they are not a fresh complete execution on the comment revision. - A fresh strict run on the current artifact passed **25 distinct Python cases once each**, with all **75 setup/call/teardown reports** passing and no required skips. Three selected native error regression unit cases also passed separately. The strict run attested the loaded extension, shim and test sources; it is not a stress-repeat result. - Against a live Spark server, **7 native Python cases passed / 0 skipped** and all three saved native streaming e2e callers passed, each **1 passed / 0 ignored**. The live Python selection deselected 194 other cases; its import provenance is bound by the staging harness. - Introspection across 12 API groups found no missing public names; Row had no missing names and remained a tuple subclass. This checks names, not all signatures or behavior. The no-stubs audit passed. Rustdoc exited 0 with two inherited warnings in types.rs (unresolved from_json link and unclosed int tag). Complete source review round 12 reported no findings. - Workspace/all-target Clippy exited **101**. All 472 emitted source diagnostics and 721 primary/secondary spans map to unchanged saved-master statements and preserved current statements. This is source attribution, not an executed master lint pass or successful Clippy run. These scoped results do not certify the README's broad parity claim. - This artifact's official configuration and DataFrame-creation modules ran through its raw-transport plugin against a live JVM: **23 passed / 1 skipped / 0 failures or errors**. The current source, saved extension and reviewed source match. - Common transport regression evidence is carried from a separate pandas artifact because all **53 shared transport/build/dependency inputs** match. Its full ordinary phase covered **87 modules: 2,586 passed / 641 skipped / 1 manifest deselection**, with **one expected missing-catalog drift-check failure and no unexpected failures**. Its separate cluster/resource phase covered **4 modules: 15 passed / 14 skipped**, including 10 functional passes and 5 guard passes. Only that donor artifact executed the full phases; this streaming artifact independently executed the plugin smoke and native checks above. The completed transport evidence and scoped native results were assessed together. Saved harness, source, artifact and endpoint evidence are retained; complete official/dependency whole-tree start/end attestations, per-case skip provenance and raw per-module pytest exit codes were not all recorded. The reported totals count test executions and do not establish whole-client parity. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex This pull request and its description were written by OpenAI Codex. -- 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]
