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-024 [thrift]: Thrift backend drops the server-supplied SQLSTATE and error code on a terminal FAILED statement: both
_check_response_for_error and _check_command_not_in_error_or_closed_state raise with only the message, so err.sql_state/err.error_code are None on Thrift while the kernel/SEA path forwards both (42P01 / 42601 verified live)
- failing test:
test_server_sqlstate_preserved_on_failed_statement (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
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
_check_response_for_errorand_check_command_not_in_error_or_closed_stateraise with only the message, soerr.sql_state/err.error_codeare None on Thrift while the kernel/SEA path forwards both (42P01 / 42601 verified live)test_server_sqlstate_preserved_on_failed_statement(see the coverage PR diff undertests/)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:
Expected (per the shared spec):
Context