[coverage] Conformance findings: STATEMENT-022

Open
#888 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
databases

Research direction

Start with the cancel() path that forwards to backend.cancel_command(active_command_id), then inspect the failing test_simultaneous_statement_cancellation in the coverage PR diff under tests/. Done means concurrent cancellation completes without an exception and emits exactly one CancelOperation RPC for the statement.

Written by the indexing model from the issue text.

Description

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-python. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-python) is fixed, then flips green as a tripwire.

Findings

  • STATEMENT-022 [thrift]: Thrift: Cursor.cancel() does not deduplicate concurrent cancels on the same statement — 3 threads emit 3 CancelOperation RPCs where the spec requires exactly 1, because cancel() forwards straight to backend.cancel_command(active_command_id) with no in-flight-cancel guard
    • failing test: test_simultaneous_statement_cancellation (see the coverage PR diff under tests/)

Reproduce & Expected

STATEMENT-022 — Validates driver handles multiple threads calling CancelOperation on same statement without deadlock or crash.

Reproduce:

SELECT a.*, b.* FROM main.tpcds_sf1_delta.catalog_returns a CROSS JOIN range(1, 10000) b ORDER BY a.cr_order_number, b.id

Expected (per the shared spec):

  • completes without an exception
  • [thrift] exactly 1 CancelOperation call(s)
  • [sea] between 1 and 3 CancelStatement call(s)

Context

Dominant language
Python
Stars
233
Forks
152
Avg merge
21h 5m
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-sql-python

All issues in databricks/databricks-sql-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.