| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Replace the SEA backend's neutral synthesized operation status with the
real fields the napi kernel handle exposes on a terminal statement:
numModifiedRows, displayMessage, diagnosticInfo, errorDetailsJson.
- OperationStatus (neutral contract) carries the four rich fields.
- SeaOperationBackend.readRichStatusFields() reads them off the terminal
sync Statement (metadata path + sync runAsync:false path once result()
resolves); null-safe and degrades to all-null on the async path and on
bindings predating the accessors. Wired into status() and the
sync/cancellable completion tick.
- SeaOperationLifecycle.seaFinished merges the rich fields into the
synthesized completion tick (lazy thunk) so finished({callback})
consumers see the same surface as getOperationStatus().
- wireSynthesis.synthesizeThriftStatus maps them into
TGetOperationStatusResp (numModifiedRows re-boxed as node-int64;
null -> undefined for Thrift parity).
numModifiedRows is currently null on SEA: the server delivers DML counts
as result-set data (num_affected_rows) rather than in the status object.
A companion kernel change derives it; this wiring surfaces it then with
no further driver change.
Co-authored-by: Isaac
|
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 (git rebase -i main). |
Sorry, something went wrong.
…essage, diagnosticInfo, errorDetailsJson) Ports the async rich-status work (was #422) onto the consolidated branch: the napi Statement.status() fields the kernel already exposes are now surfaced through getOperationStatus instead of a flat Succeeded (M1 item). Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
| Back | FazBrowse Home | New Git URL |
What
Replaces the SEA backend's neutral, synthesized operation status with the real fields the napi kernel handle exposes on a terminal statement. Before this change, SeaOperationLifecycle.synthesizeFinishedStatus() returned a fixed { state: Succeeded, hasResultSet: true } with a comment that numModifiedRows / displayMessage / etc. were "deferred to M1", so getOperationStatus() on SEA reported nothing beyond the state. The napi Statement already exposes numModifiedRows() / displayMessage() / diagnosticInfo() / errorDetailsJson(); the JS side now reads and surfaces them.
Changes
numModifiedRows note
numModifiedRows is currently null on SEA, by server behavior: the SEA /statements REST API does not populate num_modified_rows in the status object — verified live against pecotesting across dispositions/wait_timeout/user-agent. Instead, the server delivers a DML's modified-row count as result-set data (the result has columns num_affected_rows / num_inserted_rows). The kernel's Statement.numModifiedRows() reads StatementStatus.num_modified_rows, which the server never sets, so it returns null.
A companion kernel change (made in the single kernel PR) derives num_modified_rows from the DML result row. Once that lands, this driver wiring surfaces numModifiedRows with no further driver change — the title lists it as part of the operation-status surface this PR completes, not a value demonstrable today.
The other three fields (displayMessage, diagnosticInfo, errorDetailsJson) have legitimate server population paths (terminal-error states; admin-enabled workspaces for errorDetailsJson) and are surfaced by this wiring where the server provides them.
Testing
This pull request and its description were written by Isaac.