[coverage] Conformance findings: PARAMQUERY-021
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- node.js, sql, typescript
Línea de trabajo
El xfail que falla se llama “DECIMAL target — a scale-less DECIMAL declaration must not truncate the value’s fractional digits” y se referencia en tests/ en coverage PR 1179. Empieza localizando la ruta de binding de parámetros de Thrift para DBSQLParameterType.DECIMAL y ejecuta la prueba de cobertura contra el conector. Se considera terminado cuando los destinos DECIMAL declarados, sin escala y subdeclarados conservan todos los dígitos fraccionarios sin truncamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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-021 [thrift]: Thrift path truncates a scale-less DECIMAL target: '123.45' bound as DBSQLParameterType.DECIMAL rides with scale 0, so
SELECT :vreturns 123, destroying the fractional digits- failing test:
DECIMAL target — a scale-less DECIMAL declaration must not truncate the value’s fractional digits [xfail: thrift](see the coverage PR diff undertests/)
- failing test:
- PARAMQUERY-021: Thrift path truncates a scale-less DECIMAL target: '123.45' bound as DBSQLParameterType.DECIMAL is sent with scale 0, so
SELECT :vreturns 123 instead of 123.45, silently destroying the value's fractional digits (the SEA/kernel path returns 123.45 correctly)
Reproduce & Expected
PARAMQUERY-021 — Verify that declaring a DECIMAL/NUMERIC target type for a bound parameter never silently drops fractional digits.
Reproduce:
SELECT ? AS v
SELECT ? AS v
SELECT ? AS v
Expected (per the shared spec):
- All three binds prepare and execute successfully.
- (a) The declared DECIMAL(10,2) accommodates the value, so the parameter rides as that decimal type and the value compares numerically equal to 123.45 with both fractional digits intact.
- (b) THE CORE GUARANTEE: with no declared scale, the value is still 123.45 -- NOT 123. Assert the value, not the reported column type: a conforming driver may legitimately deliver this as a decimal the server inferred from the literal OR as the lossless text/string form, so the type is implementation latitude while the VALUE is the contract.
- (c) The value's own scale (4) is authoritative over the under-declared target scale (2): all four fractional digits survive. A result of 123.45 (or 123) is a truncation violation.
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/1179
- Lenguaje dominante
- TypeScript
- Estrellas
- 36
- Forks
- 50
- Merge medio
- 13 h 46 min
- PR fusionados (30 d)
- 9
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de databricks/databricks-sql-nodejs
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Docs folder deleted in 1.8.4 Abiertoengineer-bot
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
databricks/databricks-sql-nodejs#274 · 1 comentario · 1 reacción ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Todos los issues de databricks/databricks-sql-nodejs
Issues similares
-
blocklist removal
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100