Conversation
There was a problem hiding this comment.
Verdict: 1 High · 1 Medium · 1 Low
Needs changes. The main blocker is that the code relies on new kernel APIs while the dependency floor still allows older wheels, which would break every kernel query, not only Volume operations. There is also a KeyError crash when the best-effort canceller is missing.
Other findings
- 🔵 Low — This PR deletes the kernel e2e tests for staging and adds no replacements. All new coverage uses mocks that invent
is_volume_operation,complete_volume_operationreturn strings ("needs_input_stream","completed","not_volume") and exception attributes (local_os_error,http_status,local_path). Nothing in CI checks that the real kernel binding actually has these names and values. Please add kernel e2e cases, such as PUT→GET→REMOVE round trips (file andinput_stream) and a rejected symlink outside the allowed root, so a mismatch with the kernel contract fails the build.
There was a problem hiding this comment.
Verdict: 1 High · 1 Medium · 2 Nit
Needs changes: 1 high, 1 medium and 2 low findings. The high one: the new is_volume_operation attribute is read unconditionally on every execute, but the kernel floor is still ^1.4.0, so released wheels would break all kernel queries. The medium one: any kernel error with an HTTP status is turned into a generic staging OperationalError. Follow-up already noted in the PR: Windows and installed released-package validation are still open.
Other findings
- ⚪ Nit — The new ordering (backend
close_commandfirst, then_kernel_handle.close()) now applies to every kernel result set, not only Volume ones. For async results,close_commandcloses the retained owning handle and the parentStatement(client.py ~800-820) while the result stream taken from them is still open. Before this change the stream was closed first. Any error from closing the stream afterwards is logged and swallowed, but this changes the teardown order for all async results to work around a lock that only Volume transfers hold. Consider cancelling only the Volume canceller first and keeping the old order for everything else. - ⚪ Nit — Several new cancellation paths have no unit tests:
close_sessionnow cancels all in-flight sync cancellers and retained Volume cancellers, andclose_commandcancels a pending Volume canceller (client.py:784-790). The only Volume backend test coverscancel_commandandfinish_volume_operation.test_volume_close_signals_backend_before_native_lockuses a mocked backend, so it doesn't exercise the realclose_commandlogic. Add tests that (a)close_commandon a registered Volume id callscancel()and removes the entry, and (b)close_sessioncancels and clears both maps, even whencancel()raises.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Nit
Needs changes: 1 high and 1 low concern. The kernel attribute this change relies on is read on every query, but the dependency floor still allows wheels that lack it. The Volume completion, cancel and error-mapping flow otherwise looks consistent with Thrift.
Other findings
- ⚪ Nit — The two ProgrammingError message literals exceed the 100-character limit in CONTRIBUTING.md. Black doesn't split strings, so split them into adjacent literals. (Found by Claude Opus 5.5 · confirmed by the judge)
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Looks good, no blocking defects in the diff. As the PR notes, the change reads is_volume_operation and VolumeCompletion on every kernel execute, so the packaging floor and lock must select the compatible kernel release before merge. Nit: the two error-message literals in result_set.py go past the 100-char line limit.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Looks good, no blocking issues found in the connector-side wiring. Merge is still blocked on the dependency gate: the kernel package floor and lockfile do not yet select a release with the Volume APIs. I could not check against the kernel source whether metadata result handles expose is_volume_operation.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium
Needs a dependency gate before merge: 1 high concern. The completion, cancellation and error-mapping logic looks sound and has tests. But the new handle attributes are read on every query, and the package floor still allows kernel wheels that don't have them.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Needs changes: 1 high concern. The completion, cancellation and error-mapping logic looks sound and has tests. But the new kernel attributes are read unconditionally, while the dependency floor still allows kernel wheels that lack them.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Mostly solid. One medium concern: the new kernel attributes are accessed on every result set, but the kernel dependency floor has not been raised yet. The cancel/finish bookkeeping and the error mapping look consistent, and both are covered by unit tests.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Mostly solid: one medium concern. Volume completion, cancellation and error mapping look consistent with Thrift, but the new native attributes are read unconditionally while the kernel dependency floor still allows older wheels.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
One high-severity issue: the new native Volume API is called unconditionally, but the kernel dependency floor was not raised. Apart from that, the completion, cancel and error-mapping paths look consistent and have tests.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
One high concern: this would break every kernel query on the currently released kernel wheel. The staging flow, the canceller lifecycle and the error mapping otherwise look correct and are covered by tests. The PR already notes that the dependency floor is a pending gate.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Looks good, with one merge blocker the PR already names. Sync execute and every KernelResultSet now read is_volume_operation without a fallback, so any query fails on kernel wheels the current floor still allows. Bump the packaging floor and lock to the release that has the Volume API before merging.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
One high concern: the kernel floor isn't bumped. With a supported 1.5.x wheel, every kernel statement breaks, not only Volume ones. The rest of the cancellation, completion and error-mapping wiring looks consistent and has tests.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Needs changes: 1 high concern. The Volume completion and cancel wiring looks sound. However, the unconditional reads of the new kernel attribute break every kernel query on wheels the current ^1.5.0 floor still allows.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Nit
Needs changes — 1 high, 1 low. The Volume wiring, canceller lifetime and error mapping look right, but this can't merge until the kernel dependency floor is raised. Doc nit: the client.py comment says a positive _socket_timeout is the idle limit for Volume transfers, while CONNECTION_PARAMETERS.md says a redirected PUT resend has no idle bound.
Other findings
- ⚪ Nit — The
VOLUME_PATH_NOT_ALLOWEDmessage literals in result_set.py are well over the repo's 100-character line limit. Split them into implicitly concatenated string pieces. (Found by Claude Opus 5.5 · confirmed by the judge)
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 2 Low
Looks reasonable: 2 low concerns. Merge gate: KernelResultSet now reads kernel_handle.is_volume_operation unconditionally, so every query breaks on older kernel wheels until the dependency floor and lock are updated. Nit: the ProgrammingError message lines in result_set.py go over the 100-char limit.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Needs changes: 1 high concern. The Volume completion, cancellation and error mapping look sound, but the new kernel attributes are required on every query path while the dependency floor still admits kernel 1.5.0, which lacks them.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Needs changes: 1 high concern. The new volume attribute is read on every kernel result, but the dependency floor is still ^1.5.0. Nit: the client.py _socket_timeout comment says None/0 sets no Volume idle limit, while CONNECTION_PARAMETERS.md says it keeps a 15-minute default.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Looks good — 1 low concern. Merge is still blocked on the dependency gate the PR already notes: KernelResultSet reads is_volume_operation on every handle, so with the current floor an older kernel wheel would break every query.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Looks good, with 1 low concern: a code comment and the docs disagree on the default Volume transfer idle limit. Not yet mergeable: is_volume_operation is read unconditionally, so current kernel wheels break every query until the dependency floor and lock select the release with databricks/databricks-sql-kernel#513.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 2 Low
Needs changes: 1 high, 1 low. The Volume completion and cancel wiring looks correct, but the code assumes a kernel API that the current dependency floor (1.5.0) doesn't provide.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Mostly sound, with 1 medium and 1 low concern. The cancel and close wiring for sync and async Volume transfers holds up. The main risk is that every kernel query now reads is_volume_operation, which some wheels allowed by the current kernel floor (^1.5.0) don't have.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Changes requested: 1 high, 1 low. The cancel and cleanup wiring for Volume transfers looks consistent. The blocker is the unconditional is_volume_operation reads, which break every kernel query against the current ^1.5.0 kernel floor.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Needs a dependency gate before merge — 1 medium, 1 low. The native Volume completion wiring and error mapping look sound, and the tests cover the main paths well.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Looks good, with one low concern. The canceller lifecycle, the error mapping and the native completion routing check out against the sync, async and close paths. The kernel dependency floor and lockfile are not updated yet; as the PR description says, that must happen before merge.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium
Mostly sound, with 1 medium concern. set_volume_options and is_volume_operation are used without a capability check, so this needs the kernel floor/lock bump the PR already lists as a merge gate. Until then, every execute fails on kernel 1.5.0.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 2 High · 1 Low
Needs changes: 2 high, 1 low. The new kernel calls (set_volume_options, is_volume_operation) run unconditionally while the dependency floor is still ^1.5.0. On any released wheel, every query would fail.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Needs changes: 1 high concern. The Volume wiring and the Thrift-matching error mapping look correct and are tested. However, the change calls kernel APIs unconditionally, and the dependency floor still allows a kernel release that lacks them, so ordinary queries break.
The kernel backend sets the Volume options on every statement before it runs, so the kernel transfers the file of a PUT, GET or REMOVE inside execute. staging_allowed_local_path becomes the allowed directories (an empty list when unset, which still allows a REMOVE, as on Thrift), and execute(input_stream=...) supplies the bytes for PUT '__input_stream__'. A Volume result returns no rows, and local path and storage errors raise the exceptions the Thrift backend raises. Removes the guard that refused staging statements on the kernel backend. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
The kernel backend sets the staging paths on every statement, so a pathlib.Path value failed every query with a TypeError, while Thrift only rejects it for a PUT or GET. A path or a list of paths is now converted with os.fspath. Any other value allows no local paths, so a PUT or GET reports the same error as Thrift and other statements still run. Also tests the Volume error mapping on the async result path. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High
Needs changes: 1 high concern. The Volume mapping looks right, but the new kernel APIs are called on every statement, so any kernel wheel that meets the current dependency floor and predates #520/#521 fails on every execute.
Feature or gap
With
use_kernel=True, the connector refuses SQLPUT,GETandREMOVEon a Unity Catalog Volume, because the kernel returned the instruction row and moved no file.What this PR addresses
The kernel now runs a Volume transfer inside execute (databricks/databricks-sql-kernel#520, #521), so the kernel backend sets the Volume options on every statement before it runs:
staging_allowed_local_pathbecomes the allowed local directories. When it is unset, an empty list still lets aREMOVErun, as on Thrift.cursor.execute(..., input_stream=stream)supplies the bytes forPUT '__input_stream__'.execute_commandtakes the stream on every backend; Thrift and SEA ignore it.ProgrammingErrorfor a path outsidestaging_allowed_local_path,OSErrorfor a local file error, andOperationalError"Staging operation over HTTP was unsuccessful" for a storage HTTP error._socket_timeoutis the transfer's idle limit.The guard that refused staging statements on the kernel backend is removed.
Dependencies
Main's
KERNEL_REValready includes databricks/databricks-sql-kernel#520 and #521, so CI builds against them. Users get the change only after a kernel release that includes #520 and #521, with the matching dependency floor inpyproject.tomlandpoetry.lock.Tests and validation
-m "not realkernel". New tests check that the options and input bytes reach the statement, that Volume errors match Thrift, and that a Volume result returns no rows.realkerneltests pass against the bindings built fromKERNEL_REV.tests/e2e/test_kernel_backend.pyruns the shared Volume and streaming-PUT suites (10 tests) against a warehouse in kernel E2E CI.This pull request and its description were written by Isaac.