[coverage] Conformance findings: METADATA-038
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 55/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
- 領域
- databases
研究方向
Start by locating getCrossReference and the SHOW-based foreign-key reshape; the coverage PR diff under tests/ contains the failing test. Compare the reshape with the server-reported updateRule and deleteRule values. Done when reported values are preserved as numeric cells, absent values remain null, and the unrelated-table query returns no rows with the canonical columns.
由索引模型根據 Issue 內容生成。
描述
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
- METADATA-038 [sea]: SEA getCrossReference drops server-reported referential-action rules: the SHOW FOREIGN KEYS response carries updateRule/deleteRule (both "3" for a declared FK) but the kernel's SHOW-based FK reshape emits hard-coded NULLs for UPDATE_RULE/DELETE_RULE, so a reported value is discarded instead of being narrowed into the nullable Int16 column; thrift surfaces the same rules correctly
- failing test:
getCrossReference — UPDATE_RULE / DELETE_RULE carry the server's rule values(see the coverage PR diff undertests/)
- failing test:
Reproduce & Expected
METADATA-038 — Validates that the FK (cross-reference) result PRESERVES the referential-action rule codes the server reported, in the canonical UPDATE_RULE / DELETE_RULE columns, and emits NULL — never a synthesize…
Reproduce:
- Phase 1 — call the cross-reference operation for the parent/child FK pair
- Phase 2 — call it for two unrelated tables (no FK between them)
Expected (per the shared spec):
- Both phases complete successfully
- Phase 1 returns at least one FK row
- Phase 1, the core contract. For every FK row, each rule cell agrees with what the server reported on the FK metadata response observed through the proxy (
updateRule/deleteRuleon the SHOW-shaped response,UPDATE_RULE/DELETE_RULEon the native metadata response): a reported value is surfaced, and a field that is absent or null is surfaced as NULL. The driver must not substitute a default rule code for an unreported field, and must not drop a reported one. The two columns are asserted independently — one may be reported while the other is not. Do NOT assert the cells are non-null: a server that reports no rules is conforming. - Phase 1. Every non-NULL cell is a documented JDBC
importedKey*rule code (0..6) — i.e. a narrowed integer, not a truncated or re-interpreted wider value. - Phase 1. Same code space as UPDATE_RULE.
- Phase 1, on surfaces with typed result columns only: the rule columns are a NULLABLE 16-bit integer (JDBC
SMALLINT, ODBCSQL_SMALLINT, ArrowInt16). Surfaces that deliver untyped rows (e.g. Node.js plain objects) satisfy this structurally with a numeric-or-null cell. - Phase 1 negative control — unchanged by this case. PK_NAME carries the server's PK constraint name or NULL; it is never synthesized and never an empty string.
- Phase 2 returns zero rows for the unrelated pair (no error).
- Phase 2. An empty FK result still reports the full canonical cross-reference column set — UPDATE_RULE / DELETE_RULE included — so the rule columns are part of the schema contract, not an artifact of there being rows. Surfaces with their own standardised FK layout (ODBC
SQLForeignKeys) assert that layout's canonical column set in its own order.
Context
- The behavior was first fixed in a DIFFERENT driver — reference PR: https://github.com/databricks/databricks-sql-kernel/pull/381 — which seeded the shared language-neutral spec. This issue tracks the same conformance gap in databricks/databricks-sql-nodejs; 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/1741
- 主要語言
- TypeScript
- 星號
- 37
- 分支
- 52
- 平均合併
- 1 天 47 分鐘
- 30 天內合併 PR
- 10
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
databricks/databricks-sql-nodejs 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
databricks/databricks-sql-nodejs#541 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
databricks/databricks-sql-nodejs#526 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
databricks/databricks-sql-nodejs#503 ·
維護者通常 1 天內回覆
-
engineer-bot
難度 2/5 1-3 小時 新手友好度 64/100
databricks/databricks-sql-nodejs#274 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 55/100
databricks/databricks-sql-nodejs#540 ·
維護者通常 1 天內回覆
查看 databricks/databricks-sql-nodejs 的全部 Issue
相似的 Issue
-
refactor
難度 2/5 1-3 小時 新手友好度 76/100
tomnewport/memprot-topo#55 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
WalletConnect/walletconnect-monorepo#7368 · 1 則留言 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
BU-Spark/se-chem-apll#47 ·
-
documentation
難度 2/5 1 小時以內 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 2/5 半天 新手友好度 70/100
udistrital/paginaweb_root#23 ·