[coverage] Conformance findings: STATEMENT-025

Đang mở
#944 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, sql
Lĩnh vực
backend, databases

Hướng nghiên cứu

Bắt đầu bằng cách đọc test bị lỗi test_cancel_during_result_fetch_is_prompt_and_signal_only trong coverage PR và chạy test đó trên cả các đường dẫn SEA của thrift và Rust-kernel. So sánh hành vi của driver với contract STATEMENT-025 và PR 362; được coi là hoàn thành khi việc hủy fetch diễn ra nhanh chóng, báo lỗi hủy với trạng thái SQL HY008 và các câu lệnh tiếp theo vẫn hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
233
Fork
152
Merge trung bình
21 giờ 5 phút
Pull request đã merge (30 ngày)
10

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của databricks/databricks-sql-python

Tất cả issue của databricks/databricks-sql-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.