Repository navigation
Bridge SQL connection access between R and Python - #186
Draft
t-kalinowski wants to merge 9 commits into
Draft
t-kalinowski wants to merge 9 commits into
t-kalinowski wants to merge 9 commits into
Conversation
Apply the existing test-only DuckDB snapshot to direct and MXC SQL scenarios. Assert the selected version before the long query so cold caches cannot silently introduce the known Arrow cancellation limitation. Preserve production defaults, interruption deadlines, and exact results.
Queue stdin while the replacement cell is held at its checkpoint, then release it and collect the complete result. Preserve the exact output and idle-state assertions without assuming one response completes the cell.
Keep the required completion marker when a control-and-cell response is split across polls. Exercise the split with a gated native R startup cell and select the same contract in related restart continuations.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow
.console$sql_connection()and_console.sql_connection()to retrieve and select connections owned by either runtime through reticulate. For Python connections, R receives a proxy with the connection's Python methods. For R connections, Python receives an opaque handle it can pass to R functions. R remains the default SQL owner when available.Connections keep their native APIs and ownership. Getters preserve unread results; selecting a connection discards them without closing the connection or committing its transaction. Reset still restores the managed catalog, and result retrieval still uses the owning runtime.
Internally, a private reticulate callback keeps SQL access independent of a Python variable named
r. Update the documentation and model guidance, and add public regressions for connection identity, selection, reset, result lifetime, and transactions.Transcript collectors preserve the final
[done]marker when restart or interrupt output arrives before the submitted cell completes. A gated native R startup regression requires the split replies and verifies exact completion within one response deadline; related restart continuations use the same contract. Runtime behavior and deadlines are unchanged by this fixture repair.Local macOS validation covers all eight affected public cases (13 executions), the final shared-deadline startup case, and all 23 MCP client self-tests on identical client and collector sources. Formatting and
scripts/checkpassed; the final one-file deadline adjustment was validated by the focused startup case.Hosted checks for the current test-only repair are pending. The hosted Windows runner does not provide MXC, so native Windows sandbox execution remains unverified.