GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [coverage] Conformance findings: PARAMQUERY-021 · Issue #901 · databricks/databricks-sql-python

[coverage] Conformance findings: PARAMQUERY-021 #901

New issue
Copy link
New issue
Copy link
Open
Open
[coverage] Conformance findings: PARAMQUERY-021#901
Copy link
Labels
bugSomething isn't workingSomething isn't workingengineer-botMaintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR).Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR).

Description

@peco-engineer-bot
peco-engineer-bot
bot
opened on Aug 8, 2026
Issue body actions

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-021 [thrift]: DecimalParameter with explicit precision/scale renders DECIMAL(scale,precision) instead of DECIMAL(precision,scale), so a declared DECIMAL(10,2) target is sent as DECIMAL(2,10) and the server rejects it (INVALID_PARAMETER_MARKER_VALUE.INVALID_DATA_TYPE, SQLSTATE 22023)
    • failing test: test_decimal_target_type_never_truncates_bound_scale (see the coverage PR diff under tests/)
  • PARAMQUERY-021 [sea]: DecimalParameter with explicit precision/scale renders DECIMAL(scale,precision) instead of DECIMAL(precision,scale), so a declared DECIMAL(10,2) target becomes DECIMAL(2,10) and the kernel rejects the bind with ProgrammingError "DECIMAL scale must be in 0..=precision"
    • failing test: test_decimal_target_type_never_truncates_bound_scale (see the coverage PR diff under tests/)
  • PARAMQUERY-021: DecimalParameter with explicit precision/scale renders the cast expression as DECIMAL(scale,precision) instead of DECIMAL(precision,scale), so a declared DECIMAL(10,2) target is sent as DECIMAL(2,10) and every bind with an explicitly declared decimal target fails (thrift: server INVALID_PARAMETER_MARKER_VALUE.INVALID_DATA_TYPE / SQLSTATE 22023; kernel: ProgrammingError "DECIMAL scale must be in 0..=precision")

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

Activity

  1. vuanhphung
    added
    bugSomething isn't workingSomething isn't working
    engineer-botMaintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR).Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR).
    on Oct 29, 2026
  2. peco-engineer-bot commented on Oct 29, 2026

    @peco-engineer-bot
    peco-engineer-botBot
    on Oct 29, 2026 – with Peco Engineer Bot
    ContributorAuthor
    More actions

    🤖 engineer-bot opened a fix PR: #1006

    Review before merge.

  3. vuanhphung
    marked [coverage] Conformance findings: PARAMQUERY-022 #887 as a duplicate of this issue on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't workingengineer-botMaintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR).Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR).

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.