Skip to content

[coverage] Conformance findings: STATEMENT-024 #489

Description

@peco-engineer-bot

Summary

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

Findings

  • STATEMENT-024 [thrift]: Thrift path drops the server SQLSTATE on a terminal FAILED statement: OperationStateError reads TStatus.sqlState (status.sqlState), which the server leaves null, instead of the top-level TGetOperationStatusResp.sqlState that actually carries 42P01/42601 — so error.sqlState is undefined while the message looks correct. SEA conforms.
    • failing test: Execution — Server SQLSTATE on failed statement > STATEMENT-024 — failed statements carry the server SQLSTATE and error code, and the connection survives [thrift] (see the coverage PR diff under tests/)

Reproduce & Expected

STATEMENT-024 — Validates that when a statement reaches a terminal FAILED state, the error the driver raises carries the SERVER's SQLSTATE -- not null, not a synthesized placeholder -- and that it does so IDENTICALL…

Reproduce:

SELECT * FROM missing_table_<unique-per-run>
SELECT FROM WHERE
SELECT 1

Expected (per the shared spec):

  • completes without an exception
  • result has exactly 1 row(s)
  • full assertion contract:
result:
- label: missing_table
  sql_state: 42P01
- label: missing_table
  error:
    contains:
    - missing_table
    - TABLE_OR_VIEW_NOT_FOUND
    - not found
    - cannot be found
- label: missing_table
  error_code:
    is_not_null: true
- label: syntax_error
  sql_state: '42601'
- label: syntax_error
  error:
    contains:
    - syntax
    - PARSE
- label: syntax_error
  error_code:
    is_not_null: true
- label: connection_reused
  no_exception: true
- label: connection_reused
  row_count: 1

Context

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