Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#474 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
Quiet
Domain
backend, database

Research direction

Start with the coverage PR's tests/ diff and reproduce SELECT ? AS v for PARAMQUERY-022 and PARAMQUERY-023. Trace the Node.js connector's Thrift DECIMAL parameter-binding path, using the reference ODBC PR only to understand the intended behavior. Done means the xfail cases pass: declared precision and scale are preserved, and 123.45 is never silently truncated.

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-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

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.