Repository navigation
fix: populate rowcount after async DML completion - #1016
Draft
aakash-saravanan-db wants to merge 1 commit into
Draft
aakash-saravanan-db wants to merge 1 commit into
aakash-saravanan-db wants to merge 1 commit into
Conversation
Carry affected-row counts from kernel handles and Thrift operation status into async result sets, then publish them on the cursor. Preserve zero, unknown counts, and fetched counter rows. Signed-off-by: Aakash Saravanan <[email protected]>
aakash-saravanan-db
temporarily deployed
to
azure-prod
November 10, 2026 03:48 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Description
After async DML completes,
Cursor.get_async_execution_result()leavesrowcount=-1even when the server reports an affected-row count. Populate the result-set count from the kernel handle afterawait_result()or from Thrift operation status, then copy it to the cursor. Preserve zero counts, unknown counts as-1, and the fetched counter rows.Thrift performs one additional
GetOperationStatusrequest per async result retrieval. Kernel mode uses the existing cached count exposed by the companion binding change. Older kernel wheels remain supported and retain an unknown async count until upgraded; select the dependency floor and kernel pin once the binding release is available.How is this tested?
Unit tests
Manually
Connector unit suite: 1,338 passed, four skipped. New regressions fail against the unmodified connector.
Native connector tests: four passed on standard and realtime routes with the rebuilt kernel wheel.
Actual changed connector on staging DBSQL: 28/28 DML cases, 256 assertions across kernel and Thrift. Covers 12 async write variants per backend and positive/zero synchronous UPDATE controls, counts before/after fetch, counter rows, metadata, table contents, async SELECT resets, and kernel reader re-fetches.
Black and diff whitespace checks passed for changed code. Fixtures were removed and the warehouse restored to STOPPED.
Related Tickets & Documents
Companion kernel Python binding: https://github.com/databricks/databricks-sql-kernel/pull/432