[coverage] Conformance findings: STATEMENT-025

オープン
#944 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, sql
領域
backend, databases

調査の方向性

まず、coverage PR にある失敗しているテスト test_cancel_during_result_fetch_is_prompt_and_signal_only を読み、thrift と Rust-kernel の両方の SEA パスに対して実行します。driver の動作を STATEMENT-025 の契約および PR 362 と比較します。fetch のキャンセルが速やかに行われ、SQL state HY008 のキャンセルエラーが報告され、その後のステートメントも引き続き動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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-025 [thrift]: Cancel during result FETCH unwinds the fetching thread with wrong-state RESOURCE_DOES_NOT_EXIST ('Command does not exist') instead of a cancellation error
    • failing test: test_cancel_during_result_fetch_is_prompt_and_signal_only (see the coverage PR diff under tests/)
  • STATEMENT-025 [sea]: Cancel issued during a result FETCH is silently dropped on the Rust-kernel SEA path, so the in-flight fetch never unwinds and drains to natural completion
    • failing test: test_cancel_during_result_fetch_is_prompt_and_signal_only (see the coverage PR diff under tests/)
  • STATEMENT-025: Cursor.cancel() issued during a result FETCH is not honoured on either backend: thrift's interrupted fetch unwinds with wrong-state RESOURCE_DOES_NOT_EXIST instead of a cancellation error, and the Rust-kernel SEA path drops the cancel entirely so the fetch drains to natural completion; after a sync execute() returns, no cancellable in-flight operation is registered for the fetch phase

Reproduce & Expected

STATEMENT-025 — Validates cancellation while a result set is being FETCHED (not merely while the statement is EXECUTING -- that is STATEMENT-015/022).

Reproduce:

SELECT * FROM main.tpcds_sf1_delta.catalog_returns
SELECT 1
SELECT * FROM main.tpcds_sf1_delta.catalog_returns

Expected (per the shared spec):

  • completes without an exception
  • completes without an exception
  • completes without an exception
  • result has exactly 1 row(s)
  • completes without an exception
  • full assertion contract:
result:
- label: idle_cancel
  no_exception: true
- label: mid_fetch_cancel
  no_exception: true
- label: mid_fetch_cancel
  elapsed_seconds_range:
    min: 0
    max: 5
- label: cancelled_fetch
  error:
    contains:
    - cancel
    - cancelled
    - canceled
    - aborted
- label: cancelled_fetch
  sql_state: HY008
- label: cancelled_fetch
  elapsed_seconds_range:
    min: 0
    max: 30
- label: reused_statement
  no_exception: true
- label: reused_statement
  row_count: 1
- label: concurrent_cancel
  no_exception: true
- label: concurrent_cancelled_fetch
  elapsed_seconds_range:
    min: 0
    max: 30

Context

主要言語
Python
スター
233
フォーク
152
平均マージ
21時間 5分
マージ済み PR(30日)
10

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

databricks/databricks-sql-python のほかの issue

databricks/databricks-sql-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。