Repository navigation
feat(volume): enable native file transfers through ExecContext #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
78e18c7
04a0591
39733aa
cec0d85
484a2f6
2cbe208
28f724d
6cda8ed
6b45c4c
4c00ab8
e540d7a
8479abd
b93ca56
2c4a296
05c00b7
e5f6e8f
0beb472
b47ceda
092917d
c965c7f
a4ef5cf
c65fde1
a0c5358
55fb979
aa8695c
e02b741
235ad3e
684d44c
76d50d4
1c97719
16e43e9
43ecee4
3f3d591
f95ffe0
fdae998
94b7221
9980687
5345fb0
5bcd046
55686d0
3856db2
60ca0f2
c041335
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 6f4b6d607a61bdde61dcda2cf82bc8e80fd32cb9 | ||
| 37c7a3ec1b54f4690d9325d65f2220e0bb64b83e | ||
|
peco-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,8 +71,9 @@ import ( | |
| "sync/atomic" | ||
| "time" | ||
|
|
||
| dbsqlerr "github.com/databricks/databricks-sql-go/errors" | ||
| "github.com/databricks/databricks-sql-go/driverctx" | ||
| "github.com/databricks/databricks-sql-go/internal/backend" | ||
| dbsqlerrint "github.com/databricks/databricks-sql-go/internal/errors" | ||
| ) | ||
|
|
||
| // kernelSessionSeq is a process-wide monotonic counter for kernel session ids. | ||
|
|
@@ -890,15 +891,8 @@ func (k *KernelBackend) SessionID() string { return k.sessionID } | |
| // parameters (req.Params) are bound onto the statement in execute (see | ||
| // bindParams). | ||
| func (k *KernelBackend) Execute(ctx context.Context, req backend.ExecRequest) (backend.Operation, error) { | ||
| // Staging (Unity Catalog volume PUT/GET/REMOVE) needs a local file transfer the | ||
| // kernel path can't perform, and the kernel C ABI surfaces no IsStagingOperation | ||
| // signal to drive conn.execStagingOperation. Reject it here rather than let | ||
| // IsStaging return false and report success with no file moved (silent data loss). | ||
| // (Bound parameters, by contrast, ARE now supported — bound in execute via the | ||
| // kernel's raw-param C ABI.) | ||
| if isStagingStatement(req.Query) { | ||
| return &kernelOp{}, fmt.Errorf("databricks: staging operations (PUT/GET/REMOVE on a volume) are %w; "+ | ||
| "use the default (Thrift) backend", dbsqlerr.ErrNotSupportedByKernel) | ||
| if req.TransferFiles && isStagingStatement(req.Query) && len(driverctx.StagingPathsFromContext(ctx)) == 0 { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium — This turns kernel staging from rejected (wrapping
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the kernel example to pass driverctx.NewContextWithStagingInfo when optional upload paths are provided. Added the ExecContext and QueryContext contracts to CONNECTION_PARAMETERS.md and the feature to CHANGELOG.md. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the update, but the checked-out head doesn't show it yet.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The stale unsupported-transfer example is removed. CONNECTION_PARAMETERS.md and CHANGELOG.md describe ExecContext transfers, required staging context, QueryContext raw instructions, and the native publication dependency. Tested changes are at 484a2f6. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. The CHANGELOG.md entry (line 4) and the new "Volume file transfers" section in CONNECTION_PARAMETERS.md (around line 241) both look good. The example hasn't been updated yet, though:
peco-review-bot[bot] marked this conversation as resolved.
Resolved
peco-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
| return &kernelOp{}, dbsqlerrint.NewDriverError(ctx, "staging ctx must be provided.", nil) | ||
| } | ||
| return k.execute(ctx, req) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -688,6 +688,11 @@ KernelStatusCode kernel_session_rollback(kernel_session_t* session); | |
| * so a reused statement handle starts each query with a fresh parameter set. */ | ||
| KernelStatusCode kernel_statement_set_sql(kernel_statement_t* stmt, const char* sql); | ||
|
|
||
| /** Configure allowed local paths; null restores caller-managed transfers. | ||
| * retain_result keeps instructions after transfer. */ | ||
| KernelStatusCode kernel_statement_set_staging_allowed_local_paths( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The vendored header now declares
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed and still open: kernel #443 tracks publication plus the go.mod/go.sum updates in this PR before merge. Published native 1.4.0 lacks this symbol, so tagged builds using those archives cannot link. The validated local build replaces the archive with one built from the pinned kernel source; it does not validate the declared published dependency. No release version is assigned or invented. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming. The finding stays open as a merge gate until the published bindings that include this symbol are released and go.mod/go.sum in this PR are bumped to them. When that happens, please also add a CHANGELOG note giving the minimum bindings version for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium — The header now declares
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed: the published v1.4.0 archives do not export the setter. This PR is merge-gated on matching native publication and go.mod/go.sum updates in https://github.com/databricks/databricks-sql-kernel/issues/443; local validation uses the rebuilt archive, not v1.4.0. No release version has been assigned, so the dependency bump remains pending. For the summary nits: the actual JSON/CString/thread-lock/native-setter path measured 414.4 ns/call (five 10,000-call blocks after 10,000 warmups), which cannot explain the earlier 159 ms gap. None exposes raw instructions while [] denies local access, so setting it for every ExecContext prevents false-success transfers. Connection-level routing plus the live native positive/raw tests cover behavior; the previously rejected zero-session FFI/error-string test has not been restored. The changelog now explicitly describes the ErrNotSupportedByKernel fallback behavior change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming, and for linking databricks-sql-kernel#443. Since the published v1.4.0 archives still don't export There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The Go code now calls
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed this is a blocking release dependency, and the failed review job correctly reflects it. Latest native release remains v1.4.0, no replacement version is assigned, and those archives lack the symbol. Local tagged builds use the rebuilt archive and do not validate the published modules. Matching publication, go.mod/go.sum updates in this PR, and a tagged build against the published modules remain mandatory under https://github.com/databricks/databricks-sql-kernel/issues/443. Do not merge before that gate is satisfied. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming, and for linking databricks-sql-kernel#443 to track it. Nothing has changed in the code yet: go.mod still pins the bindings modules at v1.4.0, and those archives don't export There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The header now declares
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. This is a merge/release blocker tracked in https://github.com/databricks/databricks-sql-kernel/issues/443. Published v1.4.0 archives lack the setter; the local tagged build uses a rebuilt archive and does not validate those published modules. The matching native modules must be published and go.mod/go.sum updated in this PR before merge, followed by a tagged build and live lifecycle using the published artifacts. No replacement version has been assigned, and this PR remains unmerged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming, and for tracking this in databricks-sql-kernel#443. Since
peco-review-bot[bot] marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium —
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed: this is the explicit kernel #443 merge/release gate. The published-module build must pass after an assigned native version is published and go.mod/go.sum are updated in this PR. Locally rebuilt-source validation is separate. No replacement version is available to pin yet, and this PR stays unmerged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming. Since the go.mod pin hasn't changed yet and the header still declares a symbol that the published v1.4.0 archive doesn't export, I'll leave this thread open as the merge gate. Once the new native version is published and go.mod/go.sum are bumped in this PR, the |
||
| kernel_statement_t* stmt, const char* paths_json, bool retain_result); | ||
|
|
||
| /* Typed positional parameter binding (1-based ordinal); the kernel infers the | ||
| * SEA wire type from the C type. These are the "typed params" the | ||
| * kernel_statement_bind_parameter contract refers to: within one statement they | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -531,30 +531,22 @@ func TestExecuteHandleLessOpContract(t *testing.T) { | |
| } | ||
| } | ||
|
|
||
| // TestExecuteRejectsStaging drives Execute with a staging statement (not just the | ||
| // isStagingStatement detector in isolation) to pin the detector→Execute wiring: a | ||
| // refactor that dropped or reordered the check would silently reopen the | ||
| // silent-no-op data-loss path. Mirrors TestExecuteRejectsParams. | ||
| func TestExecuteRejectsStaging(t *testing.T) { | ||
| k := &KernelBackend{} | ||
| op, err := k.Execute(context.Background(), backend.ExecRequest{ | ||
| Query: "PUT '/tmp/f' INTO '/Volumes/main/s/e/f.csv'", | ||
| }) | ||
| if err == nil { | ||
| t.Fatal("expected an error for a staging statement, got nil") | ||
| } | ||
| if !errors.Is(err, dbsqlerr.ErrNotSupportedByKernel) { | ||
| t.Errorf("staging rejection should wrap ErrNotSupportedByKernel, got %v", err) | ||
| } | ||
| if op == nil { | ||
| t.Fatal("Execute must return a non-nil Operation per the Backend contract") | ||
| } | ||
| closed, closeErr := op.Close(context.Background()) | ||
| if closeErr != nil { | ||
| t.Errorf("Close error = %v, want nil", closeErr) | ||
| } | ||
| if closed { | ||
| t.Error("Close on a handle-less op must report closed=false (no CLOSE_STATEMENT)") | ||
| func TestExecuteRequiresStagingContext(t *testing.T) { | ||
|
peco-review-bot[bot] marked this conversation as resolved.
Resolved
peco-review-bot[bot] marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low — The new test only covers
Only the credential-gated e2e test exercises either path. Please add a table entry such as
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The earlier zero-session test was removed after review comment 4544844987 identified its dependence on a native new_statement(NULL) error string. Restoring that pattern would reproduce the same test-quality issue. TestConnectionTransferMode now delegates through a real handle-less Operation and covers both routing flags. The durable TestKernelE2EVolumeFileLifecycle also verifies missing context, positive allowed paths, transferred bytes, and the actual raw GET instruction without side effects; those cases passed locally. The native option boundary is covered by C ABI and non-ignored ADBC tests. Kept this behavioral coverage without a test-only production seam. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that tests shouldn't depend on the native There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low —
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An earlier review (#543 (comment)) explicitly requested removing the zero-session new_statement error-string test as brittle. It was removed accordingly. TestConnectionTransferMode checks Exec/Query flags through the real connection path; the durable native lifecycle tests positive staging context and consumes/asserts the raw GET instruction without downloading, and matched live Thrift/native raw GET/REMOVE probes pass. Keeping these behavioral checks instead of restoring the rejected null-session test or adding a production helper solely for branch coverage. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair point about the earlier review. You're right not to bring back a brittle test that matches on
peco-review-bot[bot] marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low —
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the previously resolved coverage trade-off: connection_test.go records the TransferFiles flag passed by QueryContext, and the real native API tests verify raw GET/REMOVE without side effects, ExecContext transfer behavior and missing-context rejection. The post-guard native execution combinations are not claimed as unit coverage. A nil-session error-string assertion or an extracted predicate would restate the guard without proving actual execution; I am retaining API coverage and the writable scheduled-fixture gate in kernel #443 rather than adding a test-only production seam. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a fair trade-off to make, and I understand why you'd rather not add a test-only seam. One point on the alternative, though: a nil-session test that only checks the error is not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low — The new test only covers
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The connection test asserts the captured flags are exactly [true, false], and the live raw GET/REMOVE controls verify that QueryContext returns instructions without file side effects. These tests cover the public contract. A nil-session test that relies on a later failure being different from an error string would couple coverage to an invalid backend state; I am retaining the existing flag and real-API coverage. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed on one point: the connection test pins the flags that
peco-review-bot[bot] marked this conversation as resolved.
Resolved
peco-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
| for _, query := range []string{"GET '/Volumes/main/s/v/f' TO '/tmp/f'", "PUT '/tmp/f' INTO '/Volumes/main/s/v/f'", "REMOVE '/Volumes/main/s/v/f'", "/* upload */ PUT '/tmp/f' INTO '/Volumes/main/s/v/f'"} { | ||
| t.Run(query, func(t *testing.T) { | ||
| k := &KernelBackend{} | ||
| op, err := k.Execute(context.Background(), backend.ExecRequest{Query: query, TransferFiles: true}) | ||
| if err == nil || !strings.Contains(err.Error(), "staging ctx must be provided") { | ||
| t.Fatalf("expected missing staging context error, got %v", err) | ||
| } | ||
| if op == nil { | ||
| t.Fatal("expected non-nil operation") | ||
| } | ||
| closed, closeErr := op.Close(context.Background()) | ||
| if closed || closeErr != nil { | ||
| t.Fatalf("Close = %v, %v", closed, closeErr) | ||
| } | ||
| }) | ||
| } | ||
| } | ||
|
|
||
|
peco-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ import "C" | |
| import ( | ||
| "context" | ||
| "database/sql/driver" | ||
| "encoding/json" | ||
| "errors" | ||
| "fmt" | ||
| "sync" | ||
|
|
@@ -35,8 +36,7 @@ import ( | |
| // client-timeout path, let an in-flight cancel finish in the background so | ||
| // it cannot extend the client deadline | ||
| // | ||
| // Binds any query parameters (bindParams) before executing; staging statements | ||
| // are rejected up front by Execute, so none reach here. | ||
| // Binds query parameters and configures local file access before executing. | ||
| func (k *KernelBackend) execute(ctx context.Context, req backend.ExecRequest) (backend.Operation, error) { | ||
| // Log the SQL length, not the text: query bodies can carry PII/secrets in | ||
| // WHERE/INSERT/SET, and this goes to stderr. Matches the driver's own | ||
|
|
@@ -78,6 +78,30 @@ func (k *KernelBackend) execute(ctx context.Context, req backend.ExecRequest) (b | |
| } | ||
| sql.free() | ||
|
|
||
| // Every ExecContext opts into completion, including transfers missed by the SQL recognizer. | ||
| // An empty list denies local transfers instead of reporting raw instructions as success. | ||
| if req.TransferFiles { | ||
|
peco-review-bot[bot] marked this conversation as resolved.
Resolved
peco-review-bot[bot] marked this conversation as resolved.
Resolved
peco-review-bot[bot] marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium — The new
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The real native option boundary is covered by the kernel's C ABI option tests and non-ignored ADBC set/clear/invalid-value test. The Go connection test checks ExecContext forwards TransferFiles=true and QueryContext false; the credential-gated lifecycle checks transferred bytes, denied paths, and actual raw QueryContext rows. A separate matched Thrift/native lifecycle also passed with relative and parent-directory roots. Nil is explicitly normalized to [] before marshaling. The setter-error branch frees the CString, closes the statement, and invokes evictIfSessionFatal. A pure marshaling helper would not exercise setter failure or native resource cleanup, so I have not added a test-only production seam. The coordinated native publication and go.mod/go.sum update in kernel #443 remain an explicit pre-merge gate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the detailed breakdown. I agree the nil→
peco-review-bot[bot] marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium — This branch runs on every kernel There's a second-order cost: each non-staging Exec now pays an extra
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed; the published-archive linkage gate remains unresolved in kernel #443. go.mod/go.sum must be updated in this PR before merge once a real release is assigned. The local archive replacement used for validation is explicitly recorded and does not validate published v1.4.0. On the separate setter cost, the complete JSON/CString/thread-lock/native call measured 414.4 ns median over five 10,000-call blocks after 10,000 warmups. The kernel default leaves raw instructions available; [] enables completion while denying local files. This is why ExecContext configures the option unconditionally. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming, and for the setter numbers: about 414 ns per call is small, so I'm dropping the cost question. I'm keeping this open because the main issue is still there. The current snippet now guards the setter with
peco-review-bot[bot] marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low — The new
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The native lifecycle tests the actual JSON/C-string/C-ABI option boundary, successful bytes and denied paths; the kernel has non-ignored option set/clear/invalid-value tests. A pure encoding helper test would only retest json.Marshal and would not detect a missing setter or cleanup call. Earlier review explicitly requested removing the null-session FFI/error-string guard test, and it has not been restored. Keeping the behavioral coverage and the comment explaining that [] denies transfers while an unset option returns raw instructions; no production seam solely for encoding coverage. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a fair point: a helper test on its own would mostly re-test
peco-review-bot[bot] marked this conversation as resolved.
Resolved
peco-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
| paths := driverctx.StagingPathsFromContext(ctx) | ||
|
peco-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
| if paths == nil { | ||
| paths = []string{} | ||
| } | ||
| encoded, err := json.Marshal(paths) | ||
| if err != nil { | ||
| C.kernel_statement_close(stmt) | ||
| return &kernelOp{}, fmt.Errorf("kernel: encode allowed local paths: %w", err) | ||
| } | ||
| value := newCStr(string(encoded)) | ||
| err = call(func() C.KernelStatusCode { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium — This calls the new C symbol
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed by the new CI job: Build (published kernel) fails with the missing setter in v1.4.0. The source-build job and locally rebuilt archive are separate evidence. Kernel #443 remains the merge/release gate for publication and the go.mod/go.sum bump in this PR; no replacement version is assigned. Making the job a required branch check is a repository-policy action for maintainers, also recorded in the gate. This PR stays unmerged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming. The failing |
||
| return C.kernel_statement_set_staging_allowed_local_paths(stmt, value.c, false) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High —
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed. Published v1.4.0 archives cannot link this new symbol. The local tagged build and live tests use an archive built from the pinned source; that validates implementation only. Kernel#443 tracks publishing the new native modules and updating every go.mod requirement/sum in this PR before merge. No version is assigned, so this remains an unresolved merge gate and the PR is not ready to merge. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming, and for linking the tracking issue in kernel#443. The
peco-review-bot[bot] marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium —
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed on the current head: the published-native CI log fails to link kernel_statement_set_staging_allowed_local_paths against 1.4.0. This PR is explicitly blocked from merge until matching native modules are published, go.mod/go.sum are updated, and the published-native job passes. Source-build tests do not satisfy that gate. Kernel issue #443 tracks the coordinated publication and installed-package validation; no release version has been assigned. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for confirming, and for the link to kernel issue #443. The code still calls There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium — Every kernel-backed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High —
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Converted this PR to draft. Published 1.4.0 still lacks the setter, and Build (published kernel) remains a real failing gate. #443 tracks version assignment/publication, go.mod/go.sum updates and installed-package validation before this PR is made ready. Local source builds do not satisfy that gate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for converting this to draft and opening #443 to track it. Draft status does what I asked for now, but the code at line 95 still calls a symbol that the pinned v1.4.0 bindings don't export. I'll leave this thread open as a visible blocker. It should close once go.mod/go.sum in this PR are bumped to a published bindings version that includes |
||
| }) | ||
| value.free() | ||
|
peco-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
| if err != nil { | ||
|
peco-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
| C.kernel_statement_close(stmt) | ||
| k.evictIfSessionFatal(err) | ||
| return &kernelOp{}, fmt.Errorf("kernel: allowed local paths: %w", toStatementError(err)) | ||
| } | ||
| } | ||
|
|
||
| // Bind parameters. The driver hands us backend.Param{Name, Type, Value}: the | ||
| // value is already stringified, Type is the Databricks SQL type name, and a nil | ||
| // Value is SQL NULL (Type "VOID"). Each maps 1:1 onto | ||
|
|
@@ -384,10 +408,8 @@ func (o *kernelOp) Results(ctx context.Context, callbacks *dbsqlrows.TelemetryCa | |
| return newKernelRows(ctx, o, stream, callbacks) | ||
| } | ||
|
|
||
| // IsStaging reports whether this is a staging (PUT/GET/REMOVE) operation. Always | ||
| // false on the kernel path: staging statements are rejected up front in | ||
| // Execute (isStagingStatement), so no kernelOp is ever produced for one — there | ||
| // is nothing for conn.execStagingOperation to act on here. | ||
| // IsStaging is false because the kernel completes configured file transfers | ||
| // before returning the result. | ||
| func (o *kernelOp) IsStaging(ctx context.Context) (bool, error) { return false, nil } | ||
|
|
||
| // Close best-effort closes the executed statement and its statement handle. It is | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.