Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[coverage] Conformance findings: METADATA-038

オープン
#539 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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 under tests/)

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 / deleteRule on the SHOW-shaped response, UPDATE_RULE / DELETE_RULE on 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, ODBC SQL_SMALLINT, Arrow Int16). 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

主要言語
TypeScript
スター
37
フォーク
51
平均マージ
10時間 38分
マージ済み PR(30日)
8

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

databricks/databricks-sql-nodejs のほかの issue

databricks/databricks-sql-nodejs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。