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

Open
#502 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
backend, database

Research direction

Start with the two named failing conformance tests in the coverage PR's tests/ diff, then compare their expected behavior with reference PR #167. Trace the TypeScript driver's Thrift parameter-binding path for DECIMAL values; done means both PARAMQUERY-019 and PARAMQUERY-021 xfail tests turn green without fractional-value truncation.

Written by the indexing model from the issue text.

Description

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

Dominant language
TypeScript
Stars
36
Forks
50
Avg merge
13h 46m
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-sql-nodejs

All issues in databricks/databricks-sql-nodejs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.