[coverage] Conformance findings: PARAMQUERY-019,PARAMQUERY-021

Aperta
#502 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, sql, typescript
Ambito
backend, database

Direzione di ricerca

Inizia con i due test di conformità falliti indicati per nome nel diff di tests/ della PR di coverage, quindi confronta il loro comportamento previsto con quello della PR di riferimento #167. Traccia il percorso di binding dei parametri Thrift del driver TypeScript per i valori DECIMAL; il lavoro è completo quando entrambi i test xfail PARAMQUERY-019 e PARAMQUERY-021 risultano verdi senza troncamento dei valori frazionari.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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-019 [thrift]: Thrift DECIMAL target case of the coercion table truncates the bound value ("123.45" -> 123) — same bind-side scale loss as PARAMQUERY-021; all other declared targets (INTEGER/BIGINT/DOUBLE/STRING/DATE/TIMESTAMP) conform
    • failing test: target-type coercion — the declared target type, not the source string, drives the result column type [thrift] (see the coverage PR diff under tests/)
  • PARAMQUERY-021 [thrift]: Thrift bind of a DECIMAL-typed DBSQLParameter with a scale-less target silently truncates fractional digits ("123.45" returns 123, "123.4567" returns 123) — silent numeric data loss with no error; SEA preserves the value correctly
    • failing test: under-specified DECIMAL target — fractional digits survive, never silently truncated [thrift] (see the coverage PR diff under tests/)

Reproduce & Expected

PARAMQUERY-019 — Verify setObject() coerces string "123" to integer

Reproduce:

SELECT ? AS int_value
SELECT ? AS v
PARAMQUERY-021 — Verify that declaring a DECIMAL/NUMERIC target type WITHOUT a scale never causes the driver to silently drop the fractional digits of the bound value.

Reproduce:

SELECT ? AS decimal_value
SELECT ? AS decimal_value

Context

Lingua principale
TypeScript
Stelle
36
Fork
50
Merge medio
13h 46m
PR unite (30g)
9

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di databricks/databricks-sql-nodejs

Tutte le issue di databricks/databricks-sql-nodejs

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.