fix(kernel): preserve qualified interval parameter types - #514
fix(kernel): preserve qualified interval parameter types#514cathleeny wants to merge 12 commits into
Conversation
|
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
60a5820 to
56df529
Compare
|
TODO: Pin latest kernel ref when the kernel rawParam PR is merged |
|
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a focused, well-tested change that preserves qualified interval types (INTERVAL MONTH/INTERVAL DAY) by routing all kernel bound params through the raw-parameter path; mutual-exclusivity is still enforced and unit/e2e coverage was updated correctly. One low note: the hand-edit to the generated native/kernel/index.d.ts boundary should be confirmed against the regenerated surface for the new KERNEL_REV.
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
|
Node.js integration tests triggered. View workflow runs. The result posts back here as the "Node.js Integration Tests" check. |
1 similar comment
|
Node.js integration tests triggered. View workflow runs. The result posts back here as the "Node.js Integration Tests" check. |
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — the switch to the kernel rawParams path correctly preserves qualified INTERVAL MONTH/INTERVAL DAY types while retaining DECIMAL(p,s) and NULL→VOID handling, and the mutual-exclusivity check still fires before the positionalParams ?? namedParams coalesce. One low-severity note: the new INTERVAL e2e test passes on any thrown Error, so it can succeed for the wrong reason.
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a focused, well-tested change that routes all kernel params through the new rawParams native surface to preserve qualified INTERVAL MONTH/INTERVAL DAY types. Correctness (mutual-exclusion guard, positionalParams ?? namedParams selection, VOID/named spreading) is sound and covered by unit + e2e tests. One low note on the CHANGELOG omitting the native-package caveat its sibling entries use.
Nits (not blocking): the preserves INTERVAL MONTH on the SEA wire e2e test asserts only caught instanceof Error, so any unrelated failure (connection, syntax) would satisfy it — the unit test covers type preservation directly and robustly, so this is acceptable but indirect. Also buildKernelPositionalParams/buildKernelNamedParams and the KernelPositionalParams.ts filename now build rawParams, so the naming trails the behavior. The unrelated tokenCachePassphrase addition in native/kernel/index.d.ts appears to be a benign re
[...truncated to keep verdict scannable]
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a clean, well-tested fix that sends both positional and named params through the kernel raw-parameter path so INTERVAL MONTH/INTERVAL DAY types are preserved instead of collapsed to bare INTERVAL. Logic is correct (mutual-exclusion guard intact, positionalParams ?? namedParams selects the set one) and carries unit + e2e coverage. One low note on a weak e2e assertion. Minor nit (not filed inline): KernelNativeRawParameterInput is now hand-declared in KernelNativeLoader.ts because the published kernel types don't yet expose rawParams; per the file's own prior comment this reintroduces the driver/kernel contract-drift risk the typed re-exports avoided — worth replacing with the generated type once the pinned kernel publishes it.
|
Can you trigger |
|
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Medium
Looks solid — the rawParams routing, queryId-based SqlError classification, and vendorCode/0-code handling are internally consistent and well-tested. One medium note: StatusError moving from implements Error to extends HiveDriverError is a cross-backend, public-API-visible behavior change (affects all Thrift users via Status.assert) that the CHANGELOG doesn't mention.
Signed-off-by: Cathleen Yan <cathleen.yan@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Solid, well-tested change: interval qualified types are preserved by routing through the kernel raw-parameter path, and StatusError now correctly extends HiveDriverError with SQLSTATE + vendor-code (including 0) retention. The empty-vs-non-empty queryId split (StatusError vs OperationStateError) is consistent across the direct/async paths and has good unit coverage. One low concern: the switch to rawParams-only forwarding depends on the source-pinned kernel and its CHANGELOG entry omits the published-native-bump caveat that the sibling getTypeInfo change flagged. Nit: in mapKernelErrorToJsError/StatusError, sqlState is assigned twice for the StatusError branch (constructor field + trailing defineErrorMetadata) — harmless but redundant.
Summary
INTERVAL MONTHandINTERVAL DAYin the kernel backend.Testing
npm test -- tests/unit/kernel/positionalParams.test.ts tests/unit/kernel/execution.test.tsnpx tsc --noEmit --project tsconfig.build.json{"ordinal":1,"type":"INTERVAL MONTH","value":"2-6"}