[coverage] Conformance findings: PARAMQUERY-022,PARAMQUERY-023
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- node.js, sql, typescript
Rechercherichtung
Beginne mit dem tests/ diff des Coverage-PRs und reproduziere SELECT ? AS v für PARAMQUERY-022 und PARAMQUERY-023. Verfolge den Thrift DECIMAL-Parameter-Binding-Pfad des Node.js-Connectors und verwende den Referenz-ODBC-PR nur, um das beabsichtigte Verhalten zu verstehen. Erledigt ist die Aufgabe, wenn die xfail-Fälle bestehen: Die deklarierte precision und scale bleiben erhalten, und 123.45 wird niemals stillschweigend abgeschnitten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- PARAMQUERY-022 [thrift]: Thrift DECIMAL parameter binding emits DECIMAL(precision,0) — scale hard-coded to 0 — so "123.45" declares decimal(3,0) instead of a scale-carrying decimal; SEA correctly emits decimal(5,2)
- failing test:
decimal target — "123.45" bound as DECIMAL comes back a decimal carrying scale, digits intact(see the coverage PR diff undertests/)
- failing test:
- PARAMQUERY-023 [thrift]: Thrift DECIMAL parameter binding silently TRUNCATES fractional digits: "123.45" round-trips as 123 (data corruption) via a scale-0 wire type; it neither preserves the value nor raises numeric-out-of-range, while the SEA path is lossless
- failing test:
scale-less decimal target — "123.45" is never silently truncated to 123(see the coverage PR diff undertests/)
- failing test:
Reproduce & Expected
PARAMQUERY-022 — Verify a DECIMAL/NUMERIC target with a declared precision and scale sends the parameter as a DECIMAL carrying THAT precision/scale, so the bare-marker result column is a decimal of the declared shape and the fractional digits survive.
Reproduce:
SELECT ? AS v
Expected (per the shared spec):
- result has exactly 1 row(s)
- col 0, row 0 == '123.45' (type Decimal128)
- full assertion contract:
result:
- row_count: 1
- column:
index: 0
row: 0
type: Decimal128
equals: '123.45'
- result_column_type_matches_target: true
PARAMQUERY-023 — Verify a DECIMAL/NUMERIC target with NO declared scale does not silently truncate fractional digits. An under-specified decimal target must not be forced to scale 0 — the value is preserved losslessly (the reference driver keeps the lossless value-derived type and lets the server infer the decimal).
Reproduce:
SELECT ? AS v
Expected (per the shared spec):
- result has exactly 1 row(s)
- full assertion contract:
result:
- row_count: 1
- value_preserved_losslessly: '123.45'
Context
- The behavior was first fixed in a DIFFERENT driver — reference PR: https://github.com/databricks/databricks-odbc/pull/167 — 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/1061
- Vorherrschende Sprache
- TypeScript
- Sterne
- 36
- Forks
- 50
- Ø Merge
- 13 Std. 46 Min.
- Gemergte PRs (30 T.)
- 9
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus databricks/databricks-sql-nodejs
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
engineer-bot
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
databricks/databricks-sql-nodejs#274 · 1 Kommentar · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Alle Issues in databricks/databricks-sql-nodejs
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
bug v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
modelcontextprotocol/inspector#2458 · 1 Kommentar ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
carbon-design-system/ibm-products#9907 ·