Skip to content

[coverage] Conformance findings: RESULTFETCH-214701,RESULTFETCH-214702 #475

Open

Description

@oss-engineer-bot

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-kernel. 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-kernel) is fixed, then flips green as a tripwire.

Findings

  • RESULTFETCH-214701 [sea]: closing an async statement does not invalidate the ResultStream that await_result() returned: an in-flight fetch surfaces the server's chunk 404 NOT_FOUND instead of the operation's CLOSED state, and when the close RPC fails the fetch keeps delivering the whole result (2.5M further rows after the close)
    • failing test: close_during_in_flight_result_fetch (see the coverage PR diff under tests/)
  • RESULTFETCH-214702 [sea]: cancel() does not invalidate the ResultStream that await_result() returned: the in-flight fetch fails with the same chunk 404 NOT_FOUND a close produces, so a caller cannot distinguish its own cancellation from a failure of the query
    • failing test: cancel_during_in_flight_result_fetch (see the coverage PR diff under tests/)

Reproduce & Expected

RESULTFETCH-214701 — Verify that a result fetch which is ALREADY IN FLIGHT when the application closes the operation fails promptly with the operation's CLOSED state -- not with the internal failure of the result stream…

Reproduce:

SELECT id, uuid() AS u FROM range(0, 3000000)
SELECT 1
SELECT id, uuid() AS u FROM range(0, 3000000)

Expected (per the shared spec):

  • completes without an exception
  • result has exactly 1 row(s)
  • full assertion contract:
result:
- label: close_succeeds
  exception_thrown: true
- label: close_succeeds
  operation_state_error: closed
- label: close_succeeds
  elapsed_seconds_range:
    max: 10
- label: connection_usable
  no_exception: true
- label: connection_usable
  row_count: 1
- label: close_rpc_fails
  exception_thrown: true
- label: close_rpc_fails
  operation_state_error: closed
- label: close_rpc_fails
  rows_delivered_after_close: 0
protocol:
  thrift:
  - label: close_succeeds
    call_min:
      method: CloseOperation
      min: 1
  - label: close_rpc_fails
    call_min:
      method: CloseOperation
      min: 1
  sea:
  - label: close_succeeds
    call_min:
      operation: CloseStatement
      min: 1
  - label: close_rpc_fails
    call_min:
      operation: CloseStatement
      min: 1

RESULTFETCH-214702 — Verify that a result fetch which is ALREADY IN FLIGHT when the application cancels the operation fails promptly with the operation's CANCELLED state -- not with the internal failure of the result str…

Reproduce:

SELECT id, uuid() AS u FROM range(0, 3000000)
SELECT 1

Expected (per the shared spec):

  • completes without an exception
  • result has exactly 1 row(s)
  • full assertion contract:
result:
- exception_thrown: true
- operation_state_error: canceled
- elapsed_seconds_range:
    max: 10
- label: connection_usable
  no_exception: true
- label: connection_usable
  row_count: 1
protocol:
  thrift:
  - call_min:
      method: CancelOperation
      min: 1
  - call_min:
      method: CloseOperation
      min: 1
  sea:
  - call_min:
      operation: CancelStatement
      min: 1
  - call_min:
      operation: CloseStatement
      min: 1

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions