Skip to content

feat: preserve session state when replacing its runtime - #179

Merged
Vedin merged 1 commit into
df55-physical-udf-instancefrom
oracle/qualify-stage-runtime-bridge
Nov 6, 2026
Merged

Vedin merged 1 commit into
df55-physical-udf-instancefrom
oracle/qualify-stage-runtime-bridge

Conversation

@Vedin

@Vedin Vedin commented Nov 6, 2026 •

Copy link
Copy Markdown

Which issue does this PR close?

No separate issue; this supplies the runtime/parser prerequisites for the Rustice Oracle internal-stage workstream.

Rationale for this change

A query that needs private object stores must retain the existing session's configured functions, aliases and planning state. Rebuilding through SessionStateBuilder can re-enroll function aliases, apply configuration callbacks again and reset state. A runtime-only replacement provides an explicit alternative.

What changes are included in this PR?

Add consuming SessionState::with_runtime_env(Arc), changing only the runtime field. Document that existing plans/providers may retain old resources and that the caller must supply the resources required by the preserved state. Pin the workspace parser coherently to merged sqlparser #44 for typed Snowflake PUT/GET operands; the lockfile delta is Git source IDs only.

Are these changes tested?

The tests-first baseline fails on the missing API. New tests preserve exact function/alias instances, configured callbacks, config extensions, session ID, catalog/planner/prepared-plan registries and original-runtime isolation. Rust 1.97 formatting and workspace/all-target/all-feature Clippy with -D warnings pass. The required extended workspace command passes 10,763 libtests, zero failures and ten ignored tests across 72 harnesses; the SQLLogicTest harness also completes all 509 files. The unmodified full standard ./dev/rust_lint.sh also passes: formatting, its Clippy configuration, TOML formatting, licenses, spelling, documentation formatting, workflow checks and workspace rustdoc with warnings denied.

Remote Rust CI passes all 25 jobs, including tests, Clippy, MSRV, examples, documentation, feature checks and Postgres/Substrait runners. Dev, dependencies, Docs, CodeQL and large-file checks pass. All three additional extended jobs now pass, including hash collisions and the SQLite corpus; SQLite completed after merge. Required local extended acceptance above is complete. Security audit reports the same advisory IDs as the previous pin baseline: 15 vulnerabilities and 15 allowed warnings in unchanged dependency versions (job); no audit suppression or disabled check is introduced.

The PR targets the active df55-physical-udf-instance compatibility branch. A main-only semver run dispatched during initial creation against the older main was cancelled after retargeting; that comparison is outside this change. The qualified head and current CI merge-ref trees are identical.

No existing benchmark directly measures this new opt-in setter; adjacent planner benchmarks require external fixtures or measure optimization. No query-kernel/default path or performance improvement is claimed.

Are there any user-facing changes?

An additive opt-in SessionState API and the parser pin. The merge retains the qualified head in history so downstream can pin that exact immutable, tested source. The method preserves existing state instances and does not rebuild or retroactively retarget existing plans/providers. Store/pool/cache configuration remains the caller's responsibility. Runtime authorization and file-transfer execution remain in the consuming engine.

@Vedin
Vedin changed the base branch from main to df55-physical-udf-instance November 6, 2026 18:58
@github-actions github-actions Bot added documentation Improvements or additions to documentation development-process labels Nov 6, 2026
@Vedin
Vedin marked this pull request as ready for review November 6, 2026 18:58
@Vedin
Vedin merged commit 2a6645d into df55-physical-udf-instance Nov 6, 2026
42 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant