[coverage] Conformance findings: STATEMENT-025

Aperta
#944 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, sql
Ambito
backend, databases

Direzione di ricerca

Inizia leggendo il test fallito test_cancel_during_result_fetch_is_prompt_and_signal_only nella PR di coverage ed eseguilo sia sui percorsi SEA thrift sia su quelli Rust-kernel. Confronta il comportamento del driver con il contratto STATEMENT-025 e la PR 362; il lavoro è completato quando la cancellazione del fetch è immediata, segnala un errore di cancellazione con lo stato SQL HY008 e le istruzioni successive continuano a funzionare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
233
Fork
152
Merge medio
21h 5m
PR unite (30g)
10

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di databricks/databricks-sql-python

Tutte le issue di databricks/databricks-sql-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.