[coverage] Conformance findings: PARAMQUERY-022
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza en DecimalParameter._cast_expr e inspecciona la llamada a CAST_EXPR.format descrita en el issue. Usa el diff de tests/ del PR de cobertura para localizar test_decimal_target_carries_declared_precision_and_scale y luego ejecuta esa prueba; se considera terminado cuando SELECT ? AS v conserva la forma DECIMAL(10,2) declarada y pasa el resultado esperado 123.45 Decimal128.
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-python. 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-python) is fixed, then flips green as a tripwire.
Findings
- PARAMQUERY-022 [thrift]: DecimalParameter._cast_expr formats the DECIMAL cast with its arguments transposed — CAST_EXPR.format(self.scale, self.precision) — so a declared precision=10/scale=2 target emits DECIMAL(2,10) (scale greater than precision, invalid) instead of DECIMAL(10,2), losing the declared decimal shape on the wire
- failing test:
test_decimal_target_carries_declared_precision_and_scale(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
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-python; 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
- Lenguaje dominante
- Python
- Estrellas
- 233
- Forks
- 152
- Merge medio
- 21 h 5 min
- PR fusionados (30 d)
- 10
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-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
engineer-bot
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
databricks/databricks-sql-python#860 · 3 comentarios ·
Todos los issues de databricks/databricks-sql-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
PolicyEngine/policyengine-us#9559 ·
-
priority: p3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
googleapis/librarian#7636 ·
-
from:qa priority:P2 reliability tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
spec-kitty/spec-kitty#4874 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100