Repository navigation
feat(kernel): complete SQL volume file transfers #582
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
cda34ab
489d6c5
8ad809e
2148a89
e75455b
9c1b37b
417496a
99885c1
c2d8000
37de7fd
b021a9d
76e1c43
141209e
caa35d2
c024398
47fc11d
6b8a321
07ac457
9ab5549
89abede
be17f4f
c870f3e
8bf93ff
2ca4062
c72ec90
5a608f8
e60eaf3
d9081aa
916a9d3
17f71ae
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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,10 +148,8 @@ export default class KernelSessionBackend implements ISessionBackend { | |
| * `query_tags` key (the same wire shape Thrift's `serializeQueryTags` | ||
| * produces), merged with any explicit `statementConf`. | ||
| * | ||
| * Still rejected (genuinely unsupported on kernel, rather than silently | ||
| * dropped): `useCloudFetch` (governed by the kernel `ResultConfig`, not a | ||
| * per-statement knob), `useLZ4Compression` (kernel owns result compression), | ||
| * and `stagingAllowedLocalPath` (volume operations). `maxRows` is applied by | ||
| * `stagingAllowedLocalPath` configures kernel file transfers. `useCloudFetch` | ||
| * and `useLZ4Compression` remain kernel-owned settings. `maxRows` is applied by | ||
| * the facade at fetch time, so it is intentionally not handled here. | ||
| */ | ||
| public async executeStatement(statement: string, options: ExecuteStatementOptions): Promise<IOperationBackend> { | ||
|
|
@@ -160,8 +158,7 @@ export default class KernelSessionBackend implements ISessionBackend { | |
| // Per-statement options the kernel backend doesn't honour are treated as | ||
| // NO-OPs (logged at warn), not errors — so call sites written for the Thrift | ||
| // backend are drop-in on the kernel path. These are perf/format hints the | ||
| // kernel governs internally (useCloudFetch / useLZ4Compression) or a feature | ||
| // it doesn't expose yet (staging); ignoring them cannot change query results. | ||
| // kernel governs internally (useCloudFetch / useLZ4Compression) and do not change query results. | ||
| // NB: parameter binding (compound/BINARY) is deliberately NOT no-op'd — a | ||
| // dropped param would silently change results, so it still throws. | ||
| if (options.useCloudFetch !== undefined) { | ||
|
|
@@ -180,15 +177,6 @@ export default class KernelSessionBackend implements ISessionBackend { | |
| 'kernel executeStatement: ignoring per-statement `useLZ4Compression` — result compression is governed by the kernel (no-op on kernel).', | ||
| ); | ||
| } | ||
| if (options.stagingAllowedLocalPath !== undefined) { | ||
| this.context | ||
| .getLogger() | ||
| .log( | ||
| LogLevel.warn, | ||
| 'kernel executeStatement: ignoring `stagingAllowedLocalPath` — volume/staging operations are not yet supported on the kernel backend (no-op).', | ||
| ); | ||
| } | ||
|
|
||
| // `runAsync` selects the kernel execution path. NOTE: this is a kernel- | ||
| // specific use of the option — the Thrift backend hardcodes `runAsync: true` | ||
| // on the wire and never reads `options.runAsync`, so the field is a no-op | ||
|
|
@@ -299,6 +287,11 @@ export default class KernelSessionBackend implements ISessionBackend { | |
| } | ||
|
|
||
| const execOptions: KernelNativeExecuteOptions = {}; | ||
| if (options.stagingAllowedLocalPath !== undefined) { | ||
|
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 PR deletes the The result is worse than before. A The description says publishing matching native packages is a coordinated follow-up (kernel#443). Until then, this commit on its own is a silent regression, and the
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 that the published package dependency must move before this connector merges or releases. The Dependencies section explicitly gates this PR on publication of matching native packages, a package.json/lockfile bump and installed-package acceptance under kernel issue #443. No version has been assigned, so I have not invented a version or treated source-built validation as published-package support. The current KERNEL_REV pins the validated source for source-build CI; the released 1.4.0 package does not satisfy this 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. Gating the merge on the published native packages and the package.json/lockfile bump does address the concern, and not guessing a version number makes sense. The head code still has the warning removed and still sends 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 PR removes the warn-level "ignoring The PR description says a dependency update is needed before release, but until that lands, main silently drops the option. Two ways to close the gap: land this together with the native-package bump, or have the backend detect binding support (for example from the binding version or a capability flag) and keep the warning, or throw, when the binding is too old.
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 an unresolved pre-merge dependency gate. Kernel #443 tracks publishing the new native packages and updating package.json/package-lock.json in this PR. Published 1.4.0 lacks the new option. Locally rebuilt source-pinned bindings complete the real lifecycle, but that does not establish published-package support. No release version has been assigned, so the coordinated dependency update remains open. 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 Kernel #443 to track the native-package publish and the 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 — This PR removes the warning that used to be logged when Before this change the same situation at least produced a warn-level log. Consider keeping a warning, or adding a binding capability or version check, until the native packages and dependency pin land together. Otherwise this exact source pairing is only safe if the release-coordination step is followed.
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 released native package lacks this option. Matching native publication plus package.json/package-lock updates in this PR remain explicit pre-merge gates tracked in https://github.com/databricks/databricks-sql-kernel/issues/443. The source pin and local source-built validation do not establish support with published 1.4.0. A release version is not assigned yet; this PR must remain unmerged until the dependency updates and released-artifact validation are complete. 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 that published 1.4.0 lacks this option and for linking the gates in databricks-sql-kernel#443. Holding off on merge does cover this PR. The code here hasn't changed, though: nothing checks whether the loaded native binding supports 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 — This change removes the warning for
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. Holding merge is the chosen option. Matching native publication plus package.json/package-lock bumps in this PR are explicit prerequisites under https://github.com/databricks/databricks-sql-kernel/issues/443. Latest published native is still 1.4.0; no replacement version is assigned. Source-built validation does not establish released-package support, and this PR must not merge before that gate and released-artifact validation are complete. The coordinated feature does not promise compatibility with older native packages, so no additional version/capability compatibility layer is being introduced. 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. Holding the merge is one of the options I suggested, and since the coordinated feature doesn't promise compatibility with older native packages, skipping a capability shim makes sense. The pins in 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 PR removes the warning that The result: the caller gets no error, no log line, and no file moved. Before this PR they at least saw a warn. Until the dependency bump lands, either keep a warning or gate the forwarding on a capability or version check, so a mismatched binary can't silently skip the transfer while the docs say it's honoured.
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 remains a valid pre-merge dependency finding. We are holding merge until matching native packages are published and package.json/package-lock are updated in this PR, followed by released-artifact validation, as tracked in https://github.com/databricks/databricks-sql-kernel/issues/443. No native release version is assigned yet. The feature is coordinated with the new native interface; it does not claim compatibility with old binaries, and source-build validation is not evidence that published 1.4.0 works. 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. Holding merge until the matching native packages are published, 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 change removes the warn-level 'ignoring The PR description says a coordinated package bump is planned. Until that bump lands in the same release, keep a guard here: for example, keep the warning (or throw) when the loaded binding is older than the version that supports transfers. Alternatively, land this together with the
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 on the published-package failure and merge gate. This PR must land together with matching native-package versions and lockfile updates, as tracked in https://github.com/databricks/databricks-sql-kernel/issues/443. Version 1.4.0 does not implement the field. Local builds validate the source integration only; they do not make the current package pins releasable. No native release version is assigned, so this remains blocked before 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 databricks-sql-kernel#443. Since we agree this is a merge gate, I'll leave the thread open. That way it stays in the unresolved queue until the |
||
| execOptions.stagingAllowedLocalPaths = Array.isArray(options.stagingAllowedLocalPath) | ||
| ? options.stagingAllowedLocalPath | ||
| : [options.stagingAllowedLocalPath]; | ||
| } | ||
| // Raw binding preserves qualified SQL types such as INTERVAL MONTH. | ||
| const rawParams = positionalParams ?? namedParams; | ||
| if (rawParams !== undefined) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.