Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[coverage] Conformance findings: PARAMQUERY-022,PARAMQUERY-023

Offen
#474 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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
Bereich
backend, database

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 under tests/)
  • 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 under tests/)

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

Vorherrschende Sprache
TypeScript
Sterne
36
Forks
50
Ø Merge
13 Std. 46 Min.
Gemergte PRs (30 T.)
9

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus databricks/databricks-sql-nodejs

Alle Issues in databricks/databricks-sql-nodejs

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.