[coverage] Conformance findings: STATEMENT-028
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 _check_command_not_in_error_or_closed_state 和 coverage PR 中 tests/ 下失败的测试 test_failed_operation_error_exposes_server_sql_state 开始。追踪终端操作状态负载的处理方式,以及 ServerOperationError 的抛出位置。当负载包含 SQLSTATE 时,错误会公开服务器报告的 SQLSTATE,并且指定测试通过,即为完成。
由索引模型根据 Issue 内容生成。
描述
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-028 [thrift]: Thrift backend drops the failed operation's server-reported SQLSTATE:
_check_command_not_in_error_or_closed_stateraisesServerOperationErrorfrom the terminal operation-status payload but never forwards that payload's top-levelsqlState, so the error exposes nosql_state— while the kernel backend sets that exact attribute on the same exception class, making SQLSTATE availability depend on which wire protocol delivered the failure- failing test:
test_failed_operation_error_exposes_server_sql_state(see the coverage PR diff undertests/)
- failing test:
Reproduce & Expected
STATEMENT-028 — Validates that a statement which COMPILES and then FAILS AT RUNTIME on the server raises an error carrying the server-reported SQLSTATE as first-class error metadata -- a dedicated field/accessor on…
Reproduce:
SELECT raise_error('boom')
Expected (per the shared spec):
- full assertion contract:
result:
- error:
present: true
- error:
contains:
- boom
- error_sql_state:
present: true
length: 5
condition: the terminal operation-status payload carried a SQLSTATE for the failed
operation
description: 'The error exposes a 5-character SQLSTATE. Gated on the server actually
sending one:
if the terminal payload carries none the driver must NOT invent one, and a surface
that mandates a SQLSTATE may report its own generic state (e.g. ODBC `HY000`).
'
- error_sql_state:
equals_wire_value: true
condition: the terminal operation-status payload carried a SQLSTATE for the failed
operation
description: 'Equal to the operation-level SQLSTATE the protocol blocks below locate
on the wire
for this run.
'
- error_sql_state:
not_equals: '00000'
description: 'Never the enclosing status/transport envelope''s success SQLSTATE
-- that envelope
reports that the status call succeeded, not how the query failed.
'
protocol:
thrift:
- response_field:
method: GetOperationStatus
path: sqlState
present: true
occurrence: last
condition: GetOperationStatus response operationState == ERROR_STATE
- response_field:
method: GetOperationStatus
path: status.statusCode
equals: SUCCESS_STATUS
occurrence: last
condition: GetOperationStatus response operationState == ERROR_STATE
sea:
- response_field:
operation: ExecuteStatement
path: status.sql_state
present: true
occurrence: last
condition: execute response status.state == FAILED
- response_field:
operation: GetStatementStatus
path: status.sql_state
present: true
occurrence: last
condition: status response status.state == FAILED
Context
- The behavior was first fixed in a DIFFERENT driver — reference PR: https://github.com/databricks/databricks-sql-nodejs/pull/563 — which seeded the shared language-neutral spec. This issue tracks the same conformance gap in databricks/databricks-sql-python; the reference PR is for cross-referencing the intended behavior, NOT a change to this repo.
- Coverage PR carrying the reproducing xfail test(s): https://github.com/databricks/databricks-driver-test/pull/1946
- 主要语言
- Python
- 星标
- 236
- 派生
- 162
- 平均合并
- 13 小时 13 分钟
- 30 天内合并 PR
- 23
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
databricks/databricks-sql-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
databricks/databricks-sql-python#1034 ·
维护者通常 1 天内回复
-
Token federation: `_exchange_token` raises KeyError('access_token') on error responses, discarding the real failure reason可能已有人在做 @TangoEnSkai 于 81 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
databricks/databricks-sql-python#904 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
databricks/databricks-sql-python#865 ·
维护者通常 1 天内回复
-
engineer-bot
难度 2/5 1-3 小时 新手友好度 76/100
databricks/databricks-sql-python#860 · 3 条评论 ·
维护者通常 1 天内回复
-
Cursor.close() leaks server-side handle for async commands that were never fetched可能已有人在做 @nanookclaw 于 176 天前认领。 未关闭bug engineer-bot
难度 2/5 1-3 小时 新手友好度 72/100
databricks/databricks-sql-python#791 · 5 条评论 ·
维护者通常 1 天内回复
查看 databricks/databricks-sql-python 的全部 Issue
相似的 Issue
-
premises-missing
难度 2/5 1-3 小时 新手友好度 72/100
WingedGuardian/GENesis-AGI#4432 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
huggingface/skills#301 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
intuitem/ciso-assistant-community#5275 ·
维护者通常 1 天内回复
-
comp/desktop P3 type/feature
难度 2/5 1-3 小时 新手友好度 78/100
NousResearch/hermes-agent#154285 ·
维护者通常 1 天内回复